summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/libc
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-04 09:42:11 +0000
committerLibravatar GitHub <noreply@github.com>2024-03-04 09:42:11 +0000
commitadb4cdcf6c9eacd369eaaf5b21774b198d57c040 (patch)
treea4f9c8fe2ce147fa952bcb795690afb9bb2affcb /vendor/modernc.org/libc
parent[bugfix] update postgresqlstmt to correctly use postgres err hook (#2711) (diff)
downloadgotosocial-adb4cdcf6c9eacd369eaaf5b21774b198d57c040.tar.xz
[chore]: Bump modernc.org/sqlite from 1.28.0 to 1.29.2 (#2718)
Diffstat (limited to 'vendor/modernc.org/libc')
-rw-r--r--vendor/modernc.org/libc/Makefile7
-rw-r--r--vendor/modernc.org/libc/build_all_targets.sh5
-rw-r--r--vendor/modernc.org/libc/capi_illumos_amd64.go528
-rw-r--r--vendor/modernc.org/libc/capi_linux_mips64le.go528
-rw-r--r--vendor/modernc.org/libc/ccgo.go16
-rw-r--r--vendor/modernc.org/libc/errno/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/errno/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/errno/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/errno/errno_illumos_amd64.go167
-rw-r--r--vendor/modernc.org/libc/errno/errno_linux_loong64.go311
-rw-r--r--vendor/modernc.org/libc/errno/errno_linux_mips64le.go187
-rw-r--r--vendor/modernc.org/libc/fcntl/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/fcntl/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/fcntl/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go3242
-rw-r--r--vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go697
-rw-r--r--vendor/modernc.org/libc/fcntl/fcntl_linux_mips64le.go1087
-rw-r--r--vendor/modernc.org/libc/fts/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/fts/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/fts/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/fts/fts_illumos_amd64.go3038
-rw-r--r--vendor/modernc.org/libc/fts/fts_linux_loong64.go938
-rw-r--r--vendor/modernc.org/libc/fts/fts_linux_mips64le.go1904
-rw-r--r--vendor/modernc.org/libc/grp/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/grp/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/grp/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/grp/grp_illumos_amd64.go3181
-rw-r--r--vendor/modernc.org/libc/grp/grp_linux_loong64.go349
-rw-r--r--vendor/modernc.org/libc/grp/grp_linux_mips64le.go783
-rw-r--r--vendor/modernc.org/libc/ioutil_illumos.go70
-rw-r--r--vendor/modernc.org/libc/langinfo/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/langinfo/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/langinfo/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go834
-rw-r--r--vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go241
-rw-r--r--vendor/modernc.org/libc/langinfo/langinfo_linux_mips64le.go1058
-rw-r--r--vendor/modernc.org/libc/libc.go1088
-rw-r--r--vendor/modernc.org/libc/libc32.go4
-rw-r--r--vendor/modernc.org/libc/libc64.go8
-rw-r--r--vendor/modernc.org/libc/libc_386.go38
-rw-r--r--vendor/modernc.org/libc/libc_amd64.go14
-rw-r--r--vendor/modernc.org/libc/libc_arm.go38
-rw-r--r--vendor/modernc.org/libc/libc_arm64.go38
-rw-r--r--vendor/modernc.org/libc/libc_darwin.go504
-rw-r--r--vendor/modernc.org/libc/libc_darwin_amd64.go81
-rw-r--r--vendor/modernc.org/libc/libc_darwin_arm64.go81
-rw-r--r--vendor/modernc.org/libc/libc_freebsd.go455
-rw-r--r--vendor/modernc.org/libc/libc_freebsd_386.go81
-rw-r--r--vendor/modernc.org/libc/libc_freebsd_amd64.go252
-rw-r--r--vendor/modernc.org/libc/libc_freebsd_arm.go81
-rw-r--r--vendor/modernc.org/libc/libc_freebsd_arm64.go252
-rw-r--r--vendor/modernc.org/libc/libc_illumos.go2096
-rw-r--r--vendor/modernc.org/libc/libc_illumos_amd64.go794
-rw-r--r--vendor/modernc.org/libc/libc_linux.go446
-rw-r--r--vendor/modernc.org/libc/libc_linux_386.go282
-rw-r--r--vendor/modernc.org/libc/libc_linux_amd64.go106
-rw-r--r--vendor/modernc.org/libc/libc_linux_arm.go441
-rw-r--r--vendor/modernc.org/libc/libc_linux_arm64.go284
-rw-r--r--vendor/modernc.org/libc/libc_linux_loong64.go395
-rw-r--r--vendor/modernc.org/libc/libc_linux_mips64le.go760
-rw-r--r--vendor/modernc.org/libc/libc_linux_ppc64le.go272
-rw-r--r--vendor/modernc.org/libc/libc_linux_riscv64.go289
-rw-r--r--vendor/modernc.org/libc/libc_linux_s390x.go266
-rw-r--r--vendor/modernc.org/libc/libc_loong64.go38
-rw-r--r--vendor/modernc.org/libc/libc_mips64le.go38
-rw-r--r--vendor/modernc.org/libc/libc_netbsd.go412
-rw-r--r--vendor/modernc.org/libc/libc_netbsd_amd64.go78
-rw-r--r--vendor/modernc.org/libc/libc_netbsd_arm.go78
-rw-r--r--vendor/modernc.org/libc/libc_openbsd.go475
-rw-r--r--vendor/modernc.org/libc/libc_openbsd_386.go78
-rw-r--r--vendor/modernc.org/libc/libc_openbsd_amd64.go99
-rw-r--r--vendor/modernc.org/libc/libc_openbsd_arm64.go91
-rw-r--r--vendor/modernc.org/libc/libc_ppc64le.go38
-rw-r--r--vendor/modernc.org/libc/libc_riscv64.go38
-rw-r--r--vendor/modernc.org/libc/libc_s390x.go38
-rw-r--r--vendor/modernc.org/libc/libc_unix.go413
-rw-r--r--vendor/modernc.org/libc/libc_unix1.go27
-rw-r--r--vendor/modernc.org/libc/libc_unix2.go26
-rw-r--r--vendor/modernc.org/libc/libc_windows.go1247
-rw-r--r--vendor/modernc.org/libc/libc_windows_386.go163
-rw-r--r--vendor/modernc.org/libc/libc_windows_amd64.go148
-rw-r--r--vendor/modernc.org/libc/libc_windows_arm64.go148
-rw-r--r--vendor/modernc.org/libc/limits/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/limits/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/limits/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/limits/limits_illumos_amd64.go1234
-rw-r--r--vendor/modernc.org/libc/limits/limits_linux_loong64.go310
-rw-r--r--vendor/modernc.org/libc/limits/limits_linux_mips64le.go943
-rw-r--r--vendor/modernc.org/libc/mem.go16
-rw-r--r--vendor/modernc.org/libc/mem_brk.go16
-rw-r--r--vendor/modernc.org/libc/memgrind.go36
-rw-r--r--vendor/modernc.org/libc/musl_darwin_amd64.go252
-rw-r--r--vendor/modernc.org/libc/musl_darwin_arm64.go252
-rw-r--r--vendor/modernc.org/libc/musl_freebsd_386.go167
-rw-r--r--vendor/modernc.org/libc/musl_freebsd_amd64.go165
-rw-r--r--vendor/modernc.org/libc/musl_freebsd_arm.go165
-rw-r--r--vendor/modernc.org/libc/musl_freebsd_arm64.go165
-rw-r--r--vendor/modernc.org/libc/musl_illumos_amd64.go7210
-rw-r--r--vendor/modernc.org/libc/musl_linux_386.go263
-rw-r--r--vendor/modernc.org/libc/musl_linux_amd64.go271
-rw-r--r--vendor/modernc.org/libc/musl_linux_arm.go263
-rw-r--r--vendor/modernc.org/libc/musl_linux_arm64.go261
-rw-r--r--vendor/modernc.org/libc/musl_linux_loong64.go261
-rw-r--r--vendor/modernc.org/libc/musl_linux_mips64le.go7203
-rw-r--r--vendor/modernc.org/libc/musl_linux_ppc64le.go261
-rw-r--r--vendor/modernc.org/libc/musl_linux_riscv64.go261
-rw-r--r--vendor/modernc.org/libc/musl_linux_s390x.go261
-rw-r--r--vendor/modernc.org/libc/musl_netbsd_amd64.go141
-rw-r--r--vendor/modernc.org/libc/musl_netbsd_arm.go141
-rw-r--r--vendor/modernc.org/libc/musl_openbsd_386.go168
-rw-r--r--vendor/modernc.org/libc/musl_openbsd_amd64.go168
-rw-r--r--vendor/modernc.org/libc/musl_openbsd_arm64.go168
-rw-r--r--vendor/modernc.org/libc/musl_windows_386.go73
-rw-r--r--vendor/modernc.org/libc/musl_windows_amd64.go76
-rw-r--r--vendor/modernc.org/libc/musl_windows_arm64.go76
-rw-r--r--vendor/modernc.org/libc/netdb/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/netdb/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/netdb/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go5631
-rw-r--r--vendor/modernc.org/libc/netdb/netdb_linux_loong64.go1504
-rw-r--r--vendor/modernc.org/libc/netdb/netdb_linux_mips64le.go3081
-rw-r--r--vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/netinet/in/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go4038
-rw-r--r--vendor/modernc.org/libc/netinet/in/in_linux_loong64.go1870
-rw-r--r--vendor/modernc.org/libc/netinet/in/in_linux_mips64le.go2790
-rw-r--r--vendor/modernc.org/libc/poll/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/poll/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/poll/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/poll/poll_illumos_amd64.go4081
-rw-r--r--vendor/modernc.org/libc/poll/poll_linux_loong64.go236
-rw-r--r--vendor/modernc.org/libc/poll/poll_linux_mips64le.go540
-rw-r--r--vendor/modernc.org/libc/printf.go54
-rw-r--r--vendor/modernc.org/libc/pthread.go72
-rw-r--r--vendor/modernc.org/libc/pthread/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/pthread/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/pthread/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go3059
-rw-r--r--vendor/modernc.org/libc/pthread/pthread_linux_loong64.go845
-rw-r--r--vendor/modernc.org/libc/pthread/pthread_linux_mips64le.go1873
-rw-r--r--vendor/modernc.org/libc/pthread_all.go6
-rw-r--r--vendor/modernc.org/libc/pwd/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/pwd/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/pwd/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go3188
-rw-r--r--vendor/modernc.org/libc/pwd/pwd_linux_loong64.go353
-rw-r--r--vendor/modernc.org/libc/pwd/pwd_linux_mips64le.go789
-rw-r--r--vendor/modernc.org/libc/scanf.go198
-rw-r--r--vendor/modernc.org/libc/signal/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/signal/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/signal/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/signal/more_illumos_amd64.go12
-rw-r--r--vendor/modernc.org/libc/signal/more_linux_mips64le.go12
-rw-r--r--vendor/modernc.org/libc/signal/signal_illumos_amd64.go4146
-rw-r--r--vendor/modernc.org/libc/signal/signal_linux_loong64.go1351
-rw-r--r--vendor/modernc.org/libc/signal/signal_linux_mips64le.go2198
-rw-r--r--vendor/modernc.org/libc/stdio/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/stdio/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/stdio/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go1020
-rw-r--r--vendor/modernc.org/libc/stdio/stdio_linux_loong64.go256
-rw-r--r--vendor/modernc.org/libc/stdio/stdio_linux_mips64le.go540
-rw-r--r--vendor/modernc.org/libc/stdlib/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/stdlib/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/stdlib/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go1092
-rw-r--r--vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go670
-rw-r--r--vendor/modernc.org/libc/stdlib/stdlib_linux_mips64le.go1541
-rw-r--r--vendor/modernc.org/libc/straceoff.go10
-rw-r--r--vendor/modernc.org/libc/straceon.go10
-rw-r--r--vendor/modernc.org/libc/sync.go3
-rw-r--r--vendor/modernc.org/libc/sys/socket/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/sys/socket/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go5226
-rw-r--r--vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go1068
-rw-r--r--vendor/modernc.org/libc/sys/socket/socket_linux_mips64le.go1848
-rw-r--r--vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/sys/stat/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go2941
-rw-r--r--vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go543
-rw-r--r--vendor/modernc.org/libc/sys/stat/stat_linux_mips64le.go947
-rw-r--r--vendor/modernc.org/libc/sys/types/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/sys/types/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/sys/types/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/sys/types/types_illumos_amd64.go2693
-rw-r--r--vendor/modernc.org/libc/sys/types/types_linux_loong64.go667
-rw-r--r--vendor/modernc.org/libc/sys/types/types_linux_mips64le.go1511
-rw-r--r--vendor/modernc.org/libc/termios/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/termios/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/termios/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/termios/termios_illumos_amd64.go2689
-rw-r--r--vendor/modernc.org/libc/termios/termios_linux_loong64.go680
-rw-r--r--vendor/modernc.org/libc/termios/termios_linux_mips64le.go1024
-rw-r--r--vendor/modernc.org/libc/time/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/time/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/time/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/time/time_illumos_amd64.go1468
-rw-r--r--vendor/modernc.org/libc/time/time_linux_386.go1
-rw-r--r--vendor/modernc.org/libc/time/time_linux_amd64.go2
-rw-r--r--vendor/modernc.org/libc/time/time_linux_arm.go1
-rw-r--r--vendor/modernc.org/libc/time/time_linux_arm64.go1
-rw-r--r--vendor/modernc.org/libc/time/time_linux_loong64.go260
-rw-r--r--vendor/modernc.org/libc/time/time_linux_mips64le.go682
-rw-r--r--vendor/modernc.org/libc/time/time_linux_ppc64le.go1
-rw-r--r--vendor/modernc.org/libc/time/time_linux_riscv64.go1
-rw-r--r--vendor/modernc.org/libc/time/time_linux_s390x.go1
-rw-r--r--vendor/modernc.org/libc/unistd/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/unistd/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/unistd/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go3180
-rw-r--r--vendor/modernc.org/libc/unistd/unistd_linux_loong64.go617
-rw-r--r--vendor/modernc.org/libc/unistd/unistd_linux_mips64le.go1592
-rw-r--r--vendor/modernc.org/libc/utime/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/utime/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/utime/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/utime/utime_illumos_amd64.go2801
-rw-r--r--vendor/modernc.org/libc/utime/utime_linux_loong64.go327
-rw-r--r--vendor/modernc.org/libc/utime/utime_linux_mips64le.go781
-rw-r--r--vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/uuid/uuid/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go2967
-rw-r--r--vendor/modernc.org/libc/uuid/uuid/uuid_linux_mips64le.go1986
-rw-r--r--vendor/modernc.org/libc/wctype/capi_illumos_amd64.go5
-rw-r--r--vendor/modernc.org/libc/wctype/capi_linux_loong64.go2
-rw-r--r--vendor/modernc.org/libc/wctype/capi_linux_mips64le.go5
-rw-r--r--vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go1763
-rw-r--r--vendor/modernc.org/libc/wctype/wctype_linux_loong64.go352
-rw-r--r--vendor/modernc.org/libc/wctype/wctype_linux_mips64le.go953
231 files changed, 136459 insertions, 5995 deletions
diff --git a/vendor/modernc.org/libc/Makefile b/vendor/modernc.org/libc/Makefile
index 33e582f66..1b87fd28a 100644
--- a/vendor/modernc.org/libc/Makefile
+++ b/vendor/modernc.org/libc/Makefile
@@ -9,6 +9,7 @@
linux_amd64 \
linux_arm \
linux_arm64 \
+ strace \
grep=--include=*.go --include=*.l --include=*.y --include=*.yy --include=*.qbe --include=*.ssa
@@ -171,6 +172,8 @@ editor:
gofmt -l -s -w *.go
go test -short 2>&1 | tee -a log
go install -v ./...
+ go build -o /dev/null generate.go
+ go build -o /dev/null strace.go
later:
@grep -n $(grep) LATER * || true
@@ -197,3 +200,7 @@ work:
go work use ../ccgo/v4
go work use ../ccgo/v3
go work use ../cc/v4
+
+strace:
+ go run strace.go
+ go build -v ./...
diff --git a/vendor/modernc.org/libc/build_all_targets.sh b/vendor/modernc.org/libc/build_all_targets.sh
index 6d278e41d..c682fae2b 100644
--- a/vendor/modernc.org/libc/build_all_targets.sh
+++ b/vendor/modernc.org/libc/build_all_targets.sh
@@ -1,5 +1,5 @@
set -e
-for tag in none dmesg libc.membrk libc.memgrind
+for tag in none libc.dmesg libc.membrk libc.memgrind libc.strace
do
echo "-tags=$tag"
echo "GOOS=darwin GOARCH=amd64"
@@ -32,6 +32,9 @@ do
echo "GOOS=linux GOARCH=loong64"
GOOS=linux GOARCH=loong64 go build -tags=$tag -v ./...
GOOS=linux GOARCH=loong64 go test -tags=$tag -c -o /dev/null
+ echo "GOOS=linux GOARCH=mips64le"
+ GOOS=linux GOARCH=mips64le go build -tags=$tag -v ./...
+ GOOS=linux GOARCH=mips64le go test -tags=$tag -c -o /dev/null
echo "GOOS=linux GOARCH=ppc64le"
GOOS=linux GOARCH=ppc64le go build -tags=$tag -v ./...
GOOS=linux GOARCH=ppc64le go test -tags=$tag -c -o /dev/null
diff --git a/vendor/modernc.org/libc/capi_illumos_amd64.go b/vendor/modernc.org/libc/capi_illumos_amd64.go
new file mode 100644
index 000000000..c1ae9d026
--- /dev/null
+++ b/vendor/modernc.org/libc/capi_illumos_amd64.go
@@ -0,0 +1,528 @@
+// Code generated by 'go generate' - DO NOT EDIT.
+
+package libc // import "modernc.org/libc"
+
+var CAPI = map[string]struct{}{
+ "_IO_putc": {},
+ "___errno_location": {},
+ "__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_b_loc": {},
+ "__ctype_get_mb_cur_max": {},
+ "__errno_location": {},
+ "__floatscan": {},
+ "__fpclassify": {},
+ "__fpclassifyf": {},
+ "__fpclassifyl": {},
+ "__fsmu8": {},
+ "__h_errno_location": {},
+ "__inet_aton": {},
+ "__intscan": {},
+ "__isalnum_l": {},
+ "__isalpha_l": {},
+ "__isdigit_l": {},
+ "__islower_l": {},
+ "__isnan": {},
+ "__isnanf": {},
+ "__isnanl": {},
+ "__isoc99_sscanf": {},
+ "__isprint_l": {},
+ "__isupper_l": {},
+ "__isxdigit_l": {},
+ "__lockfile": {},
+ "__lookup_ipliteral": {},
+ "__lookup_name": {},
+ "__lookup_serv": {},
+ "__shgetc": {},
+ "__shlim": {},
+ "__strncasecmp_l": {},
+ "__sync_add_and_fetch_uint32": {},
+ "__sync_sub_and_fetch_uint32": {},
+ "__syscall1": {},
+ "__syscall3": {},
+ "__syscall4": {},
+ "__toread": {},
+ "__toread_needs_stdio_exit": {},
+ "__uflow": {},
+ "__unlockfile": {},
+ "_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": {},
+ "bzero": {},
+ "calloc": {},
+ "ceil": {},
+ "ceilf": {},
+ "cfgetospeed": {},
+ "cfsetispeed": {},
+ "cfsetospeed": {},
+ "chdir": {},
+ "chmod": {},
+ "chown": {},
+ "clock_gettime": {},
+ "close": {},
+ "closedir": {},
+ "confstr": {},
+ "connect": {},
+ "copysign": {},
+ "copysignf": {},
+ "copysignl": {},
+ "cos": {},
+ "cosf": {},
+ "cosh": {},
+ "ctime": {},
+ "ctime_r": {},
+ "dlclose": {},
+ "dlerror": {},
+ "dlopen": {},
+ "dlsym": {},
+ "dup2": {},
+ "dup3": {},
+ "endpwent": {},
+ "environ": {},
+ "execvp": {},
+ "exit": {},
+ "exp": {},
+ "fabs": {},
+ "fabsf": {},
+ "fabsl": {},
+ "faccessat": {},
+ "fchmod": {},
+ "fchmodat": {},
+ "fchown": {},
+ "fchownat": {},
+ "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": {},
+ "fstatfs": {},
+ "fsync": {},
+ "ftell": {},
+ "ftruncate": {},
+ "ftruncate64": {},
+ "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": {},
+ "gethostbyname_r": {},
+ "gethostname": {},
+ "getnameinfo": {},
+ "getpeername": {},
+ "getpid": {},
+ "getpwnam": {},
+ "getpwnam_r": {},
+ "getpwuid": {},
+ "getpwuid_r": {},
+ "getrandom": {},
+ "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": {},
+ "isupper": {},
+ "iswalnum": {},
+ "iswspace": {},
+ "isxdigit": {},
+ "kill": {},
+ "ldexp": {},
+ "link": {},
+ "linkat": {},
+ "listen": {},
+ "llabs": {},
+ "localeconv": {},
+ "localtime": {},
+ "localtime_r": {},
+ "log": {},
+ "log10": {},
+ "log2": {},
+ "longjmp": {},
+ "lrand48": {},
+ "lseek": {},
+ "lseek64": {},
+ "lstat": {},
+ "lstat64": {},
+ "malloc": {},
+ "mblen": {},
+ "mbrtowc": {},
+ "mbsinit": {},
+ "mbstowcs": {},
+ "mbtowc": {},
+ "memchr": {},
+ "memcmp": {},
+ "memcpy": {},
+ "memmove": {},
+ "memset": {},
+ "mkdir": {},
+ "mkdirat": {},
+ "mkfifo": {},
+ "mknod": {},
+ "mknodat": {},
+ "mkostemp": {},
+ "mkstemp": {},
+ "mkstemp64": {},
+ "mkstemps": {},
+ "mkstemps64": {},
+ "mktime": {},
+ "mmap": {},
+ "mmap64": {},
+ "modf": {},
+ "mremap": {},
+ "munmap": {},
+ "nanf": {},
+ "nanosleep": {},
+ "nl_langinfo": {},
+ "ntohs": {},
+ "obstack_free": {},
+ "obstack_vprintf": {},
+ "open": {},
+ "open64": {},
+ "openat": {},
+ "opendir": {},
+ "openpty": {},
+ "pathconf": {},
+ "pause": {},
+ "pclose": {},
+ "perror": {},
+ "pipe": {},
+ "pipe2": {},
+ "poll": {},
+ "popen": {},
+ "posix_fadvise": {},
+ "pow": {},
+ "pread": {},
+ "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": {},
+ "pwrite": {},
+ "qsort": {},
+ "raise": {},
+ "rand": {},
+ "rand_r": {},
+ "random": {},
+ "random_r": {},
+ "read": {},
+ "readdir": {},
+ "readdir64": {},
+ "readlink": {},
+ "readlinkat": {},
+ "readv": {},
+ "realloc": {},
+ "reallocarray": {},
+ "realpath": {},
+ "recv": {},
+ "recvfrom": {},
+ "recvmsg": {},
+ "remove": {},
+ "rename": {},
+ "renameat2": {},
+ "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": {},
+ "strlcat": {},
+ "strlcpy": {},
+ "strlen": {},
+ "strncasecmp": {},
+ "strncat": {},
+ "strncmp": {},
+ "strncpy": {},
+ "strnlen": {},
+ "strpbrk": {},
+ "strrchr": {},
+ "strspn": {},
+ "strstr": {},
+ "strtod": {},
+ "strtof": {},
+ "strtoimax": {},
+ "strtok": {},
+ "strtol": {},
+ "strtold": {},
+ "strtoll": {},
+ "strtoul": {},
+ "strtoull": {},
+ "strtoumax": {},
+ "symlink": {},
+ "symlinkat": {},
+ "sysconf": {},
+ "system": {},
+ "tan": {},
+ "tanh": {},
+ "tcgetattr": {},
+ "tcsendbreak": {},
+ "tcsetattr": {},
+ "time": {},
+ "tmpfile": {},
+ "tolower": {},
+ "toupper": {},
+ "trunc": {},
+ "tzset": {},
+ "umask": {},
+ "uname": {},
+ "ungetc": {},
+ "unlink": {},
+ "unlinkat": {},
+ "unsetenv": {},
+ "usleep": {},
+ "utime": {},
+ "utimensat": {},
+ "utimes": {},
+ "uuid_copy": {},
+ "uuid_generate_random": {},
+ "uuid_parse": {},
+ "uuid_unparse": {},
+ "vasprintf": {},
+ "vfprintf": {},
+ "vfscanf": {},
+ "vprintf": {},
+ "vsnprintf": {},
+ "vsprintf": {},
+ "vsscanf": {},
+ "waitpid": {},
+ "wcschr": {},
+ "wctomb": {},
+ "wcwidth": {},
+ "write": {},
+ "writev": {},
+ "zero_struct_address": {},
+}
diff --git a/vendor/modernc.org/libc/capi_linux_mips64le.go b/vendor/modernc.org/libc/capi_linux_mips64le.go
new file mode 100644
index 000000000..c1ae9d026
--- /dev/null
+++ b/vendor/modernc.org/libc/capi_linux_mips64le.go
@@ -0,0 +1,528 @@
+// Code generated by 'go generate' - DO NOT EDIT.
+
+package libc // import "modernc.org/libc"
+
+var CAPI = map[string]struct{}{
+ "_IO_putc": {},
+ "___errno_location": {},
+ "__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_b_loc": {},
+ "__ctype_get_mb_cur_max": {},
+ "__errno_location": {},
+ "__floatscan": {},
+ "__fpclassify": {},
+ "__fpclassifyf": {},
+ "__fpclassifyl": {},
+ "__fsmu8": {},
+ "__h_errno_location": {},
+ "__inet_aton": {},
+ "__intscan": {},
+ "__isalnum_l": {},
+ "__isalpha_l": {},
+ "__isdigit_l": {},
+ "__islower_l": {},
+ "__isnan": {},
+ "__isnanf": {},
+ "__isnanl": {},
+ "__isoc99_sscanf": {},
+ "__isprint_l": {},
+ "__isupper_l": {},
+ "__isxdigit_l": {},
+ "__lockfile": {},
+ "__lookup_ipliteral": {},
+ "__lookup_name": {},
+ "__lookup_serv": {},
+ "__shgetc": {},
+ "__shlim": {},
+ "__strncasecmp_l": {},
+ "__sync_add_and_fetch_uint32": {},
+ "__sync_sub_and_fetch_uint32": {},
+ "__syscall1": {},
+ "__syscall3": {},
+ "__syscall4": {},
+ "__toread": {},
+ "__toread_needs_stdio_exit": {},
+ "__uflow": {},
+ "__unlockfile": {},
+ "_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": {},
+ "bzero": {},
+ "calloc": {},
+ "ceil": {},
+ "ceilf": {},
+ "cfgetospeed": {},
+ "cfsetispeed": {},
+ "cfsetospeed": {},
+ "chdir": {},
+ "chmod": {},
+ "chown": {},
+ "clock_gettime": {},
+ "close": {},
+ "closedir": {},
+ "confstr": {},
+ "connect": {},
+ "copysign": {},
+ "copysignf": {},
+ "copysignl": {},
+ "cos": {},
+ "cosf": {},
+ "cosh": {},
+ "ctime": {},
+ "ctime_r": {},
+ "dlclose": {},
+ "dlerror": {},
+ "dlopen": {},
+ "dlsym": {},
+ "dup2": {},
+ "dup3": {},
+ "endpwent": {},
+ "environ": {},
+ "execvp": {},
+ "exit": {},
+ "exp": {},
+ "fabs": {},
+ "fabsf": {},
+ "fabsl": {},
+ "faccessat": {},
+ "fchmod": {},
+ "fchmodat": {},
+ "fchown": {},
+ "fchownat": {},
+ "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": {},
+ "fstatfs": {},
+ "fsync": {},
+ "ftell": {},
+ "ftruncate": {},
+ "ftruncate64": {},
+ "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": {},
+ "gethostbyname_r": {},
+ "gethostname": {},
+ "getnameinfo": {},
+ "getpeername": {},
+ "getpid": {},
+ "getpwnam": {},
+ "getpwnam_r": {},
+ "getpwuid": {},
+ "getpwuid_r": {},
+ "getrandom": {},
+ "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": {},
+ "isupper": {},
+ "iswalnum": {},
+ "iswspace": {},
+ "isxdigit": {},
+ "kill": {},
+ "ldexp": {},
+ "link": {},
+ "linkat": {},
+ "listen": {},
+ "llabs": {},
+ "localeconv": {},
+ "localtime": {},
+ "localtime_r": {},
+ "log": {},
+ "log10": {},
+ "log2": {},
+ "longjmp": {},
+ "lrand48": {},
+ "lseek": {},
+ "lseek64": {},
+ "lstat": {},
+ "lstat64": {},
+ "malloc": {},
+ "mblen": {},
+ "mbrtowc": {},
+ "mbsinit": {},
+ "mbstowcs": {},
+ "mbtowc": {},
+ "memchr": {},
+ "memcmp": {},
+ "memcpy": {},
+ "memmove": {},
+ "memset": {},
+ "mkdir": {},
+ "mkdirat": {},
+ "mkfifo": {},
+ "mknod": {},
+ "mknodat": {},
+ "mkostemp": {},
+ "mkstemp": {},
+ "mkstemp64": {},
+ "mkstemps": {},
+ "mkstemps64": {},
+ "mktime": {},
+ "mmap": {},
+ "mmap64": {},
+ "modf": {},
+ "mremap": {},
+ "munmap": {},
+ "nanf": {},
+ "nanosleep": {},
+ "nl_langinfo": {},
+ "ntohs": {},
+ "obstack_free": {},
+ "obstack_vprintf": {},
+ "open": {},
+ "open64": {},
+ "openat": {},
+ "opendir": {},
+ "openpty": {},
+ "pathconf": {},
+ "pause": {},
+ "pclose": {},
+ "perror": {},
+ "pipe": {},
+ "pipe2": {},
+ "poll": {},
+ "popen": {},
+ "posix_fadvise": {},
+ "pow": {},
+ "pread": {},
+ "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": {},
+ "pwrite": {},
+ "qsort": {},
+ "raise": {},
+ "rand": {},
+ "rand_r": {},
+ "random": {},
+ "random_r": {},
+ "read": {},
+ "readdir": {},
+ "readdir64": {},
+ "readlink": {},
+ "readlinkat": {},
+ "readv": {},
+ "realloc": {},
+ "reallocarray": {},
+ "realpath": {},
+ "recv": {},
+ "recvfrom": {},
+ "recvmsg": {},
+ "remove": {},
+ "rename": {},
+ "renameat2": {},
+ "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": {},
+ "strlcat": {},
+ "strlcpy": {},
+ "strlen": {},
+ "strncasecmp": {},
+ "strncat": {},
+ "strncmp": {},
+ "strncpy": {},
+ "strnlen": {},
+ "strpbrk": {},
+ "strrchr": {},
+ "strspn": {},
+ "strstr": {},
+ "strtod": {},
+ "strtof": {},
+ "strtoimax": {},
+ "strtok": {},
+ "strtol": {},
+ "strtold": {},
+ "strtoll": {},
+ "strtoul": {},
+ "strtoull": {},
+ "strtoumax": {},
+ "symlink": {},
+ "symlinkat": {},
+ "sysconf": {},
+ "system": {},
+ "tan": {},
+ "tanh": {},
+ "tcgetattr": {},
+ "tcsendbreak": {},
+ "tcsetattr": {},
+ "time": {},
+ "tmpfile": {},
+ "tolower": {},
+ "toupper": {},
+ "trunc": {},
+ "tzset": {},
+ "umask": {},
+ "uname": {},
+ "ungetc": {},
+ "unlink": {},
+ "unlinkat": {},
+ "unsetenv": {},
+ "usleep": {},
+ "utime": {},
+ "utimensat": {},
+ "utimes": {},
+ "uuid_copy": {},
+ "uuid_generate_random": {},
+ "uuid_parse": {},
+ "uuid_unparse": {},
+ "vasprintf": {},
+ "vfprintf": {},
+ "vfscanf": {},
+ "vprintf": {},
+ "vsnprintf": {},
+ "vsprintf": {},
+ "vsscanf": {},
+ "waitpid": {},
+ "wcschr": {},
+ "wctomb": {},
+ "wcwidth": {},
+ "write": {},
+ "writev": {},
+ "zero_struct_address": {},
+}
diff --git a/vendor/modernc.org/libc/ccgo.go b/vendor/modernc.org/libc/ccgo.go
index 2dad0cbbc..4703f83ad 100644
--- a/vendor/modernc.org/libc/ccgo.go
+++ b/vendor/modernc.org/libc/ccgo.go
@@ -802,6 +802,22 @@ func PostIncAtomicUint32(p *uint32, d uint32) uint32 { return atomic.AddUint
func PostIncAtomicUint64(p *uint64, d uint64) uint64 { return atomic.AddUint64(p, d) - d }
func PostIncAtomicUintptr(p *uintptr, d uintptr) uintptr { return atomic.AddUintptr(p, d) - d }
+func PostIncAtomicInt32P(p uintptr, d int32) int32 {
+ return atomic.AddInt32((*int32)(unsafe.Pointer(p)), d) - d
+}
+func PostIncAtomicInt64P(p uintptr, d int64) int64 {
+ return atomic.AddInt64((*int64)(unsafe.Pointer(p)), d) - d
+}
+func PostIncAtomicUint32P(p uintptr, d uint32) uint32 {
+ return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), d) - d
+}
+func PostIncAtomicUint64P(p uintptr, d uint64) uint64 {
+ return atomic.AddUint64((*uint64)(unsafe.Pointer(p)), d) - d
+}
+func PostIncAtomicUintptrP(p uintptr, d uintptr) uintptr {
+ return atomic.AddUintptr((*uintptr)(unsafe.Pointer(p)), d) - d
+}
+
func PostDecInt8(p *int8, d int8) int8 { r := *p; *p -= d; return r }
func PostDecInt16(p *int16, d int16) int16 { r := *p; *p -= d; return r }
func PostDecInt32(p *int32, d int32) int32 { r := *p; *p -= d; return r }
diff --git a/vendor/modernc.org/libc/errno/capi_illumos_amd64.go b/vendor/modernc.org/libc/errno/capi_illumos_amd64.go
new file mode 100644
index 000000000..4fe785afa
--- /dev/null
+++ b/vendor/modernc.org/libc/errno/capi_illumos_amd64.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_illumos_amd64.go -pkgname errno', DO NOT EDIT.
+
+package errno
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/errno/capi_linux_loong64.go b/vendor/modernc.org/libc/errno/capi_linux_loong64.go
index 75a92265f..6193b2b0e 100644
--- a/vendor/modernc.org/libc/errno/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/errno/capi_linux_loong64.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 -ignore-unsupported-alignment -o errno/errno_linux_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_linux_loong64.go -pkgname errno', DO NOT EDIT.
package errno
diff --git a/vendor/modernc.org/libc/errno/capi_linux_mips64le.go b/vendor/modernc.org/libc/errno/capi_linux_mips64le.go
new file mode 100644
index 000000000..75a92265f
--- /dev/null
+++ b/vendor/modernc.org/libc/errno/capi_linux_mips64le.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_linux_amd64.go -pkgname errno', DO NOT EDIT.
+
+package errno
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/errno/errno_illumos_amd64.go b/vendor/modernc.org/libc/errno/errno_illumos_amd64.go
new file mode 100644
index 000000000..18c535687
--- /dev/null
+++ b/vendor/modernc.org/libc/errno/errno_illumos_amd64.go
@@ -0,0 +1,167 @@
+// 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_illumos_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:63:1:
+ EADDRINUSE = 125 // errno.h:173:1:
+ EADDRNOTAVAIL = 126 // errno.h:174:1:
+ EADV = 68 // errno.h:128:1:
+ EAFNOSUPPORT = 124 // errno.h:171:1:
+ EAGAIN = 11 // errno.h:61:1:
+ EALREADY = 149 // errno.h:193:1:
+ EBADE = 50 // errno.h:104:1:
+ EBADF = 9 // errno.h:59:1:
+ EBADFD = 81 // errno.h:143:1:
+ EBADMSG = 77 // errno.h:139:1:
+ EBADR = 51 // errno.h:105:1:
+ EBADRQC = 54 // errno.h:108:1:
+ EBADSLT = 55 // errno.h:109:1:
+ EBFONT = 57 // errno.h:112:1:
+ EBUSY = 16 // errno.h:66:1:
+ ECANCELED = 47 // errno.h:97:1:
+ ECHILD = 10 // errno.h:60:1:
+ ECHRNG = 37 // errno.h:87:1:
+ ECOMM = 70 // errno.h:131:1:
+ ECONNABORTED = 130 // errno.h:180:1:
+ ECONNREFUSED = 146 // errno.h:189:1:
+ ECONNRESET = 131 // errno.h:181:1:
+ EDEADLK = 45 // errno.h:95:1:
+ EDEADLOCK = 56 // errno.h:110:1:
+ EDESTADDRREQ = 96 // errno.h:163:1:
+ EDOM = 33 // errno.h:83:1:
+ EDQUOT = 49 // errno.h:101:1:
+ EEXIST = 17 // errno.h:67:1:
+ EFAULT = 14 // errno.h:64:1:
+ EFBIG = 27 // errno.h:77:1:
+ EHOSTDOWN = 147 // errno.h:190:1:
+ EHOSTUNREACH = 148 // errno.h:191:1:
+ EIDRM = 36 // errno.h:86:1:
+ EILSEQ = 88 // errno.h:152:1:
+ EINPROGRESS = 150 // errno.h:194:1:
+ EINTR = 4 // errno.h:54:1:
+ EINVAL = 22 // errno.h:72:1:
+ EIO = 5 // errno.h:55:1:
+ EISCONN = 133 // errno.h:183:1:
+ EISDIR = 21 // errno.h:71:1:
+ EL2HLT = 44 // errno.h:94:1:
+ EL2NSYNC = 38 // errno.h:88:1:
+ EL3HLT = 39 // errno.h:89:1:
+ EL3RST = 40 // errno.h:90:1:
+ ELIBACC = 83 // errno.h:147:1:
+ ELIBBAD = 84 // errno.h:148:1:
+ ELIBEXEC = 87 // errno.h:151:1:
+ ELIBMAX = 86 // errno.h:150:1:
+ ELIBSCN = 85 // errno.h:149:1:
+ ELNRNG = 41 // errno.h:91:1:
+ ELOCKUNMAPPED = 72 // errno.h:135:1:
+ ELOOP = 90 // errno.h:154:1:
+ EMFILE = 24 // errno.h:74:1:
+ EMLINK = 31 // errno.h:81:1:
+ EMSGSIZE = 97 // errno.h:164:1:
+ EMULTIHOP = 74 // errno.h:138:1:
+ ENAMETOOLONG = 78 // errno.h:140:1:
+ ENETDOWN = 127 // errno.h:176:1:
+ ENETRESET = 129 // errno.h:178:1:
+ ENETUNREACH = 128 // errno.h:177:1:
+ ENFILE = 23 // errno.h:73:1:
+ ENOANO = 53 // errno.h:107:1:
+ ENOBUFS = 132 // errno.h:182:1:
+ ENOCSI = 43 // errno.h:93:1:
+ ENODATA = 61 // errno.h:120:1:
+ ENODEV = 19 // errno.h:69:1:
+ ENOENT = 2 // errno.h:52:1:
+ ENOEXEC = 8 // errno.h:58:1:
+ ENOLCK = 46 // errno.h:96:1:
+ ENOLINK = 67 // errno.h:127:1:
+ ENOMEM = 12 // errno.h:62:1:
+ ENOMSG = 35 // errno.h:85:1:
+ ENONET = 64 // errno.h:124:1:
+ ENOPKG = 65 // errno.h:125:1:
+ ENOPROTOOPT = 99 // errno.h:166:1:
+ ENOSPC = 28 // errno.h:78:1:
+ ENOSR = 63 // errno.h:122:1:
+ ENOSTR = 60 // errno.h:119:1:
+ ENOSYS = 89 // errno.h:153:1:
+ ENOTACTIVE = 73 // errno.h:137:1:
+ ENOTBLK = 15 // errno.h:65:1:
+ ENOTCONN = 134 // errno.h:184:1:
+ ENOTDIR = 20 // errno.h:70:1:
+ ENOTEMPTY = 93 // errno.h:157:1:
+ ENOTRECOVERABLE = 59 // errno.h:116:1:
+ ENOTSOCK = 95 // errno.h:162:1:
+ ENOTSUP = 48 // errno.h:98:1:
+ ENOTTY = 25 // errno.h:75:1:
+ ENOTUNIQ = 80 // errno.h:142:1:
+ ENXIO = 6 // errno.h:56:1:
+ EOPNOTSUPP = 122 // errno.h:169:1:
+ EOVERFLOW = 79 // errno.h:141:1:
+ EOWNERDEAD = 58 // errno.h:115:1:
+ EPERM = 1 // errno.h:51:1:
+ EPFNOSUPPORT = 123 // errno.h:170:1:
+ EPIPE = 32 // errno.h:82:1:
+ EPROTO = 71 // errno.h:132:1:
+ EPROTONOSUPPORT = 120 // errno.h:167:1:
+ EPROTOTYPE = 98 // errno.h:165:1:
+ ERANGE = 34 // errno.h:84:1:
+ EREMCHG = 82 // errno.h:144:1:
+ EREMOTE = 66 // errno.h:126:1:
+ ERESTART = 91 // errno.h:155:1:
+ EROFS = 30 // errno.h:80:1:
+ ESHUTDOWN = 143 // errno.h:186:1:
+ ESOCKTNOSUPPORT = 121 // errno.h:168:1:
+ ESPIPE = 29 // errno.h:79:1:
+ ESRCH = 3 // errno.h:53:1:
+ ESRMNT = 69 // errno.h:129:1:
+ ESTALE = 151 // errno.h:197:1:
+ ESTRPIPE = 92 // errno.h:156:1:
+ ETIME = 62 // errno.h:121:1:
+ ETIMEDOUT = 145 // errno.h:188:1:
+ ETOOMANYREFS = 144 // errno.h:187:1:
+ ETXTBSY = 26 // errno.h:76:1:
+ EUNATCH = 42 // errno.h:92:1:
+ EUSERS = 94 // errno.h:158:1:
+ EWOULDBLOCK = 11 // errno.h:192:1:
+ EXDEV = 18 // errno.h:68:1:
+ EXFULL = 52 // errno.h:106:1:
+ X_ERRNO_H = 0 // errno.h:33:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_SYS_ERRNO_H = 0 // errno.h:41:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+// ANSI C++ requires that errno be a macro
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/errno/errno_linux_loong64.go b/vendor/modernc.org/libc/errno/errno_linux_loong64.go
index 000cb720c..4410e8ee2 100644
--- a/vendor/modernc.org/libc/errno/errno_linux_loong64.go
+++ b/vendor/modernc.org/libc/errno/errno_linux_loong64.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 -ignore-unsupported-alignment -o errno/errno_linux_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_linux_loong64.go -pkgname errno', DO NOT EDIT.
package errno
@@ -15,155 +15,166 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- E2BIG = 7 // errno-base.h:11:1:
- EACCES = 13 // errno-base.h:17:1:
- EADDRINUSE = 98 // errno.h:81:1:
- EADDRNOTAVAIL = 99 // errno.h:82:1:
- EADV = 68 // errno.h:51:1:
- EAFNOSUPPORT = 97 // errno.h:80:1:
- EAGAIN = 11 // errno-base.h:15:1:
- EALREADY = 114 // errno.h:97:1:
- EBADE = 52 // errno.h:33:1:
- EBADF = 9 // errno-base.h:13:1:
- EBADFD = 77 // errno.h:60:1:
- EBADMSG = 74 // errno.h:57:1:
- EBADR = 53 // errno.h:34:1:
- EBADRQC = 56 // errno.h:37:1:
- EBADSLT = 57 // errno.h:38:1:
- EBFONT = 59 // errno.h:42:1:
- EBUSY = 16 // errno-base.h:20:1:
- ECANCELED = 125 // errno.h:109:1:
- ECHILD = 10 // errno-base.h:14:1:
- ECHRNG = 44 // errno.h:25:1:
- ECOMM = 70 // errno.h:53:1:
- ECONNABORTED = 103 // errno.h:86:1:
- ECONNREFUSED = 111 // errno.h:94:1:
- ECONNRESET = 104 // errno.h:87:1:
- EDEADLK = 35 // errno.h:7:1:
- EDEADLOCK = 35 // errno.h:40:1:
- EDESTADDRREQ = 89 // errno.h:72:1:
- EDOM = 33 // errno-base.h:37:1:
- EDOTDOT = 73 // errno.h:56:1:
- EDQUOT = 122 // errno.h:105:1:
- EEXIST = 17 // errno-base.h:21:1:
- EFAULT = 14 // errno-base.h:18:1:
- EFBIG = 27 // errno-base.h:31:1:
- EHOSTDOWN = 112 // errno.h:95:1:
- EHOSTUNREACH = 113 // errno.h:96:1:
- EHWPOISON = 133 // errno.h:121:1:
- EIDRM = 43 // errno.h:24:1:
- EILSEQ = 84 // errno.h:67:1:
- EINPROGRESS = 115 // errno.h:98:1:
- EINTR = 4 // errno-base.h:8:1:
- EINVAL = 22 // errno-base.h:26:1:
- EIO = 5 // errno-base.h:9:1:
- EISCONN = 106 // errno.h:89:1:
- EISDIR = 21 // errno-base.h:25:1:
- EISNAM = 120 // errno.h:103:1:
- EKEYEXPIRED = 127 // errno.h:111:1:
- EKEYREJECTED = 129 // errno.h:113:1:
- EKEYREVOKED = 128 // errno.h:112:1:
- EL2HLT = 51 // errno.h:32:1:
- EL2NSYNC = 45 // errno.h:26:1:
- EL3HLT = 46 // errno.h:27:1:
- EL3RST = 47 // errno.h:28:1:
- ELIBACC = 79 // errno.h:62:1:
- ELIBBAD = 80 // errno.h:63:1:
- ELIBEXEC = 83 // errno.h:66:1:
- ELIBMAX = 82 // errno.h:65:1:
- ELIBSCN = 81 // errno.h:64:1:
- ELNRNG = 48 // errno.h:29:1:
- ELOOP = 40 // errno.h:21:1:
- EMEDIUMTYPE = 124 // errno.h:108:1:
- EMFILE = 24 // errno-base.h:28:1:
- EMLINK = 31 // errno-base.h:35:1:
- EMSGSIZE = 90 // errno.h:73:1:
- EMULTIHOP = 72 // errno.h:55:1:
- ENAMETOOLONG = 36 // errno.h:8:1:
- ENAVAIL = 119 // errno.h:102:1:
- ENETDOWN = 100 // errno.h:83:1:
- ENETRESET = 102 // errno.h:85:1:
- ENETUNREACH = 101 // errno.h:84:1:
- ENFILE = 23 // errno-base.h:27:1:
- ENOANO = 55 // errno.h:36:1:
- ENOBUFS = 105 // errno.h:88:1:
- ENOCSI = 50 // errno.h:31:1:
- ENODATA = 61 // errno.h:44:1:
- ENODEV = 19 // errno-base.h:23:1:
- ENOENT = 2 // errno-base.h:6:1:
- ENOEXEC = 8 // errno-base.h:12:1:
- ENOKEY = 126 // errno.h:110:1:
- ENOLCK = 37 // errno.h:9:1:
- ENOLINK = 67 // errno.h:50:1:
- ENOMEDIUM = 123 // errno.h:107:1:
- ENOMEM = 12 // errno-base.h:16:1:
- ENOMSG = 42 // errno.h:23:1:
- ENONET = 64 // errno.h:47:1:
- ENOPKG = 65 // errno.h:48:1:
- ENOPROTOOPT = 92 // errno.h:75:1:
- ENOSPC = 28 // errno-base.h:32:1:
- ENOSR = 63 // errno.h:46:1:
- ENOSTR = 60 // errno.h:43:1:
- ENOSYS = 38 // errno.h:18:1:
- ENOTBLK = 15 // errno-base.h:19:1:
- ENOTCONN = 107 // errno.h:90:1:
- ENOTDIR = 20 // errno-base.h:24:1:
- ENOTEMPTY = 39 // errno.h:20:1:
- ENOTNAM = 118 // errno.h:101:1:
- ENOTRECOVERABLE = 131 // errno.h:117:1:
- ENOTSOCK = 88 // errno.h:71:1:
- ENOTSUP = 95 // errno.h:30:1:
- ENOTTY = 25 // errno-base.h:29:1:
- ENOTUNIQ = 76 // errno.h:59:1:
- ENXIO = 6 // errno-base.h:10:1:
- EOPNOTSUPP = 95 // errno.h:78:1:
- EOVERFLOW = 75 // errno.h:58:1:
- EOWNERDEAD = 130 // errno.h:116:1:
- EPERM = 1 // errno-base.h:5:1:
- EPFNOSUPPORT = 96 // errno.h:79:1:
- EPIPE = 32 // errno-base.h:36:1:
- EPROTO = 71 // errno.h:54:1:
- EPROTONOSUPPORT = 93 // errno.h:76:1:
- EPROTOTYPE = 91 // errno.h:74:1:
- ERANGE = 34 // errno-base.h:38:1:
- EREMCHG = 78 // errno.h:61:1:
- EREMOTE = 66 // errno.h:49:1:
- EREMOTEIO = 121 // errno.h:104:1:
- ERESTART = 85 // errno.h:68:1:
- ERFKILL = 132 // errno.h:119:1:
- EROFS = 30 // errno-base.h:34:1:
- ESHUTDOWN = 108 // errno.h:91:1:
- ESOCKTNOSUPPORT = 94 // errno.h:77:1:
- ESPIPE = 29 // errno-base.h:33:1:
- ESRCH = 3 // errno-base.h:7:1:
- ESRMNT = 69 // errno.h:52:1:
- ESTALE = 116 // errno.h:99:1:
- ESTRPIPE = 86 // errno.h:69:1:
- ETIME = 62 // errno.h:45:1:
- ETIMEDOUT = 110 // errno.h:93:1:
- ETOOMANYREFS = 109 // errno.h:92:1:
- ETXTBSY = 26 // errno-base.h:30:1:
- EUCLEAN = 117 // errno.h:100:1:
- EUNATCH = 49 // errno.h:30:1:
- EUSERS = 87 // errno.h:70:1:
- EWOULDBLOCK = 11 // errno.h:22:1:
- EXDEV = 18 // errno-base.h:22:1:
- EXFULL = 54 // errno.h:35:1:
- X_ASM_GENERIC_ERRNO_BASE_H = 0 // errno-base.h:3:1:
- X_ASM_GENERIC_ERRNO_H = 0 // errno.h:3:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ERRNO_H = 1 // errno.h:20:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ERRNO_H = 1 // errno.h:23:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ E2BIG = 7 // errno-base.h:11:1:
+ EACCES = 13 // errno-base.h:17:1:
+ EADDRINUSE = 98 // errno.h:81:1:
+ EADDRNOTAVAIL = 99 // errno.h:82:1:
+ EADV = 68 // errno.h:51:1:
+ EAFNOSUPPORT = 97 // errno.h:80:1:
+ EAGAIN = 11 // errno-base.h:15:1:
+ EALREADY = 114 // errno.h:97:1:
+ EBADE = 52 // errno.h:33:1:
+ EBADF = 9 // errno-base.h:13:1:
+ EBADFD = 77 // errno.h:60:1:
+ EBADMSG = 74 // errno.h:57:1:
+ EBADR = 53 // errno.h:34:1:
+ EBADRQC = 56 // errno.h:37:1:
+ EBADSLT = 57 // errno.h:38:1:
+ EBFONT = 59 // errno.h:42:1:
+ EBUSY = 16 // errno-base.h:20:1:
+ ECANCELED = 125 // errno.h:109:1:
+ ECHILD = 10 // errno-base.h:14:1:
+ ECHRNG = 44 // errno.h:25:1:
+ ECOMM = 70 // errno.h:53:1:
+ ECONNABORTED = 103 // errno.h:86:1:
+ ECONNREFUSED = 111 // errno.h:94:1:
+ ECONNRESET = 104 // errno.h:87:1:
+ EDEADLK = 35 // errno.h:7:1:
+ EDEADLOCK = 35 // errno.h:40:1:
+ EDESTADDRREQ = 89 // errno.h:72:1:
+ EDOM = 33 // errno-base.h:37:1:
+ EDOTDOT = 73 // errno.h:56:1:
+ EDQUOT = 122 // errno.h:105:1:
+ EEXIST = 17 // errno-base.h:21:1:
+ EFAULT = 14 // errno-base.h:18:1:
+ EFBIG = 27 // errno-base.h:31:1:
+ EHOSTDOWN = 112 // errno.h:95:1:
+ EHOSTUNREACH = 113 // errno.h:96:1:
+ EHWPOISON = 133 // errno.h:121:1:
+ EIDRM = 43 // errno.h:24:1:
+ EILSEQ = 84 // errno.h:67:1:
+ EINPROGRESS = 115 // errno.h:98:1:
+ EINTR = 4 // errno-base.h:8:1:
+ EINVAL = 22 // errno-base.h:26:1:
+ EIO = 5 // errno-base.h:9:1:
+ EISCONN = 106 // errno.h:89:1:
+ EISDIR = 21 // errno-base.h:25:1:
+ EISNAM = 120 // errno.h:103:1:
+ EKEYEXPIRED = 127 // errno.h:111:1:
+ EKEYREJECTED = 129 // errno.h:113:1:
+ EKEYREVOKED = 128 // errno.h:112:1:
+ EL2HLT = 51 // errno.h:32:1:
+ EL2NSYNC = 45 // errno.h:26:1:
+ EL3HLT = 46 // errno.h:27:1:
+ EL3RST = 47 // errno.h:28:1:
+ ELIBACC = 79 // errno.h:62:1:
+ ELIBBAD = 80 // errno.h:63:1:
+ ELIBEXEC = 83 // errno.h:66:1:
+ ELIBMAX = 82 // errno.h:65:1:
+ ELIBSCN = 81 // errno.h:64:1:
+ ELNRNG = 48 // errno.h:29:1:
+ ELOOP = 40 // errno.h:21:1:
+ EMEDIUMTYPE = 124 // errno.h:108:1:
+ EMFILE = 24 // errno-base.h:28:1:
+ EMLINK = 31 // errno-base.h:35:1:
+ EMSGSIZE = 90 // errno.h:73:1:
+ EMULTIHOP = 72 // errno.h:55:1:
+ ENAMETOOLONG = 36 // errno.h:8:1:
+ ENAVAIL = 119 // errno.h:102:1:
+ ENETDOWN = 100 // errno.h:83:1:
+ ENETRESET = 102 // errno.h:85:1:
+ ENETUNREACH = 101 // errno.h:84:1:
+ ENFILE = 23 // errno-base.h:27:1:
+ ENOANO = 55 // errno.h:36:1:
+ ENOBUFS = 105 // errno.h:88:1:
+ ENOCSI = 50 // errno.h:31:1:
+ ENODATA = 61 // errno.h:44:1:
+ ENODEV = 19 // errno-base.h:23:1:
+ ENOENT = 2 // errno-base.h:6:1:
+ ENOEXEC = 8 // errno-base.h:12:1:
+ ENOKEY = 126 // errno.h:110:1:
+ ENOLCK = 37 // errno.h:9:1:
+ ENOLINK = 67 // errno.h:50:1:
+ ENOMEDIUM = 123 // errno.h:107:1:
+ ENOMEM = 12 // errno-base.h:16:1:
+ ENOMSG = 42 // errno.h:23:1:
+ ENONET = 64 // errno.h:47:1:
+ ENOPKG = 65 // errno.h:48:1:
+ ENOPROTOOPT = 92 // errno.h:75:1:
+ ENOSPC = 28 // errno-base.h:32:1:
+ ENOSR = 63 // errno.h:46:1:
+ ENOSTR = 60 // errno.h:43:1:
+ ENOSYS = 38 // errno.h:18:1:
+ ENOTBLK = 15 // errno-base.h:19:1:
+ ENOTCONN = 107 // errno.h:90:1:
+ ENOTDIR = 20 // errno-base.h:24:1:
+ ENOTEMPTY = 39 // errno.h:20:1:
+ ENOTNAM = 118 // errno.h:101:1:
+ ENOTRECOVERABLE = 131 // errno.h:117:1:
+ ENOTSOCK = 88 // errno.h:71:1:
+ ENOTSUP = 95 // errno.h:30:1:
+ ENOTTY = 25 // errno-base.h:29:1:
+ ENOTUNIQ = 76 // errno.h:59:1:
+ ENXIO = 6 // errno-base.h:10:1:
+ EOPNOTSUPP = 95 // errno.h:78:1:
+ EOVERFLOW = 75 // errno.h:58:1:
+ EOWNERDEAD = 130 // errno.h:116:1:
+ EPERM = 1 // errno-base.h:5:1:
+ EPFNOSUPPORT = 96 // errno.h:79:1:
+ EPIPE = 32 // errno-base.h:36:1:
+ EPROTO = 71 // errno.h:54:1:
+ EPROTONOSUPPORT = 93 // errno.h:76:1:
+ EPROTOTYPE = 91 // errno.h:74:1:
+ ERANGE = 34 // errno-base.h:38:1:
+ EREMCHG = 78 // errno.h:61:1:
+ EREMOTE = 66 // errno.h:49:1:
+ EREMOTEIO = 121 // errno.h:104:1:
+ ERESTART = 85 // errno.h:68:1:
+ ERFKILL = 132 // errno.h:119:1:
+ EROFS = 30 // errno-base.h:34:1:
+ ESHUTDOWN = 108 // errno.h:91:1:
+ ESOCKTNOSUPPORT = 94 // errno.h:77:1:
+ ESPIPE = 29 // errno-base.h:33:1:
+ ESRCH = 3 // errno-base.h:7:1:
+ ESRMNT = 69 // errno.h:52:1:
+ ESTALE = 116 // errno.h:99:1:
+ ESTRPIPE = 86 // errno.h:69:1:
+ ETIME = 62 // errno.h:45:1:
+ ETIMEDOUT = 110 // errno.h:93:1:
+ ETOOMANYREFS = 109 // errno.h:92:1:
+ ETXTBSY = 26 // errno-base.h:30:1:
+ EUCLEAN = 117 // errno.h:100:1:
+ EUNATCH = 49 // errno.h:30:1:
+ EUSERS = 87 // errno.h:70:1:
+ EWOULDBLOCK = 11 // errno.h:22:1:
+ EXDEV = 18 // errno-base.h:22:1:
+ EXFULL = 54 // errno.h:35:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ASM_GENERIC_ERRNO_BASE_H = 0 // errno-base.h:3:1:
+ X_ASM_GENERIC_ERRNO_H = 0 // errno.h:3:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ERRNO_H = 1 // errno.h:20:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ERRNO_H = 1 // errno.h:23:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
diff --git a/vendor/modernc.org/libc/errno/errno_linux_mips64le.go b/vendor/modernc.org/libc/errno/errno_linux_mips64le.go
new file mode 100644
index 000000000..000cb720c
--- /dev/null
+++ b/vendor/modernc.org/libc/errno/errno_linux_mips64le.go
@@ -0,0 +1,187 @@
+// 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_linux_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-base.h:11:1:
+ EACCES = 13 // errno-base.h:17:1:
+ EADDRINUSE = 98 // errno.h:81:1:
+ EADDRNOTAVAIL = 99 // errno.h:82:1:
+ EADV = 68 // errno.h:51:1:
+ EAFNOSUPPORT = 97 // errno.h:80:1:
+ EAGAIN = 11 // errno-base.h:15:1:
+ EALREADY = 114 // errno.h:97:1:
+ EBADE = 52 // errno.h:33:1:
+ EBADF = 9 // errno-base.h:13:1:
+ EBADFD = 77 // errno.h:60:1:
+ EBADMSG = 74 // errno.h:57:1:
+ EBADR = 53 // errno.h:34:1:
+ EBADRQC = 56 // errno.h:37:1:
+ EBADSLT = 57 // errno.h:38:1:
+ EBFONT = 59 // errno.h:42:1:
+ EBUSY = 16 // errno-base.h:20:1:
+ ECANCELED = 125 // errno.h:109:1:
+ ECHILD = 10 // errno-base.h:14:1:
+ ECHRNG = 44 // errno.h:25:1:
+ ECOMM = 70 // errno.h:53:1:
+ ECONNABORTED = 103 // errno.h:86:1:
+ ECONNREFUSED = 111 // errno.h:94:1:
+ ECONNRESET = 104 // errno.h:87:1:
+ EDEADLK = 35 // errno.h:7:1:
+ EDEADLOCK = 35 // errno.h:40:1:
+ EDESTADDRREQ = 89 // errno.h:72:1:
+ EDOM = 33 // errno-base.h:37:1:
+ EDOTDOT = 73 // errno.h:56:1:
+ EDQUOT = 122 // errno.h:105:1:
+ EEXIST = 17 // errno-base.h:21:1:
+ EFAULT = 14 // errno-base.h:18:1:
+ EFBIG = 27 // errno-base.h:31:1:
+ EHOSTDOWN = 112 // errno.h:95:1:
+ EHOSTUNREACH = 113 // errno.h:96:1:
+ EHWPOISON = 133 // errno.h:121:1:
+ EIDRM = 43 // errno.h:24:1:
+ EILSEQ = 84 // errno.h:67:1:
+ EINPROGRESS = 115 // errno.h:98:1:
+ EINTR = 4 // errno-base.h:8:1:
+ EINVAL = 22 // errno-base.h:26:1:
+ EIO = 5 // errno-base.h:9:1:
+ EISCONN = 106 // errno.h:89:1:
+ EISDIR = 21 // errno-base.h:25:1:
+ EISNAM = 120 // errno.h:103:1:
+ EKEYEXPIRED = 127 // errno.h:111:1:
+ EKEYREJECTED = 129 // errno.h:113:1:
+ EKEYREVOKED = 128 // errno.h:112:1:
+ EL2HLT = 51 // errno.h:32:1:
+ EL2NSYNC = 45 // errno.h:26:1:
+ EL3HLT = 46 // errno.h:27:1:
+ EL3RST = 47 // errno.h:28:1:
+ ELIBACC = 79 // errno.h:62:1:
+ ELIBBAD = 80 // errno.h:63:1:
+ ELIBEXEC = 83 // errno.h:66:1:
+ ELIBMAX = 82 // errno.h:65:1:
+ ELIBSCN = 81 // errno.h:64:1:
+ ELNRNG = 48 // errno.h:29:1:
+ ELOOP = 40 // errno.h:21:1:
+ EMEDIUMTYPE = 124 // errno.h:108:1:
+ EMFILE = 24 // errno-base.h:28:1:
+ EMLINK = 31 // errno-base.h:35:1:
+ EMSGSIZE = 90 // errno.h:73:1:
+ EMULTIHOP = 72 // errno.h:55:1:
+ ENAMETOOLONG = 36 // errno.h:8:1:
+ ENAVAIL = 119 // errno.h:102:1:
+ ENETDOWN = 100 // errno.h:83:1:
+ ENETRESET = 102 // errno.h:85:1:
+ ENETUNREACH = 101 // errno.h:84:1:
+ ENFILE = 23 // errno-base.h:27:1:
+ ENOANO = 55 // errno.h:36:1:
+ ENOBUFS = 105 // errno.h:88:1:
+ ENOCSI = 50 // errno.h:31:1:
+ ENODATA = 61 // errno.h:44:1:
+ ENODEV = 19 // errno-base.h:23:1:
+ ENOENT = 2 // errno-base.h:6:1:
+ ENOEXEC = 8 // errno-base.h:12:1:
+ ENOKEY = 126 // errno.h:110:1:
+ ENOLCK = 37 // errno.h:9:1:
+ ENOLINK = 67 // errno.h:50:1:
+ ENOMEDIUM = 123 // errno.h:107:1:
+ ENOMEM = 12 // errno-base.h:16:1:
+ ENOMSG = 42 // errno.h:23:1:
+ ENONET = 64 // errno.h:47:1:
+ ENOPKG = 65 // errno.h:48:1:
+ ENOPROTOOPT = 92 // errno.h:75:1:
+ ENOSPC = 28 // errno-base.h:32:1:
+ ENOSR = 63 // errno.h:46:1:
+ ENOSTR = 60 // errno.h:43:1:
+ ENOSYS = 38 // errno.h:18:1:
+ ENOTBLK = 15 // errno-base.h:19:1:
+ ENOTCONN = 107 // errno.h:90:1:
+ ENOTDIR = 20 // errno-base.h:24:1:
+ ENOTEMPTY = 39 // errno.h:20:1:
+ ENOTNAM = 118 // errno.h:101:1:
+ ENOTRECOVERABLE = 131 // errno.h:117:1:
+ ENOTSOCK = 88 // errno.h:71:1:
+ ENOTSUP = 95 // errno.h:30:1:
+ ENOTTY = 25 // errno-base.h:29:1:
+ ENOTUNIQ = 76 // errno.h:59:1:
+ ENXIO = 6 // errno-base.h:10:1:
+ EOPNOTSUPP = 95 // errno.h:78:1:
+ EOVERFLOW = 75 // errno.h:58:1:
+ EOWNERDEAD = 130 // errno.h:116:1:
+ EPERM = 1 // errno-base.h:5:1:
+ EPFNOSUPPORT = 96 // errno.h:79:1:
+ EPIPE = 32 // errno-base.h:36:1:
+ EPROTO = 71 // errno.h:54:1:
+ EPROTONOSUPPORT = 93 // errno.h:76:1:
+ EPROTOTYPE = 91 // errno.h:74:1:
+ ERANGE = 34 // errno-base.h:38:1:
+ EREMCHG = 78 // errno.h:61:1:
+ EREMOTE = 66 // errno.h:49:1:
+ EREMOTEIO = 121 // errno.h:104:1:
+ ERESTART = 85 // errno.h:68:1:
+ ERFKILL = 132 // errno.h:119:1:
+ EROFS = 30 // errno-base.h:34:1:
+ ESHUTDOWN = 108 // errno.h:91:1:
+ ESOCKTNOSUPPORT = 94 // errno.h:77:1:
+ ESPIPE = 29 // errno-base.h:33:1:
+ ESRCH = 3 // errno-base.h:7:1:
+ ESRMNT = 69 // errno.h:52:1:
+ ESTALE = 116 // errno.h:99:1:
+ ESTRPIPE = 86 // errno.h:69:1:
+ ETIME = 62 // errno.h:45:1:
+ ETIMEDOUT = 110 // errno.h:93:1:
+ ETOOMANYREFS = 109 // errno.h:92:1:
+ ETXTBSY = 26 // errno-base.h:30:1:
+ EUCLEAN = 117 // errno.h:100:1:
+ EUNATCH = 49 // errno.h:30:1:
+ EUSERS = 87 // errno.h:70:1:
+ EWOULDBLOCK = 11 // errno.h:22:1:
+ EXDEV = 18 // errno-base.h:22:1:
+ EXFULL = 54 // errno.h:35:1:
+ X_ASM_GENERIC_ERRNO_BASE_H = 0 // errno-base.h:3:1:
+ X_ASM_GENERIC_ERRNO_H = 0 // errno.h:3:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ERRNO_H = 1 // errno.h:20:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ERRNO_H = 1 // errno.h:23:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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/fcntl/capi_illumos_amd64.go b/vendor/modernc.org/libc/fcntl/capi_illumos_amd64.go
new file mode 100644
index 000000000..4e7d96df7
--- /dev/null
+++ b/vendor/modernc.org/libc/fcntl/capi_illumos_amd64.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_illumos_amd64.go -pkgname fcntl', DO NOT EDIT.
+
+package fcntl
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go b/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go
index 9db297f1a..b62370d48 100644
--- a/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/fcntl/capi_linux_loong64.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 -ignore-unsupported-alignment -o fcntl/fcntl_linux_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_linux_loong64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
diff --git a/vendor/modernc.org/libc/fcntl/capi_linux_mips64le.go b/vendor/modernc.org/libc/fcntl/capi_linux_mips64le.go
new file mode 100644
index 000000000..9db297f1a
--- /dev/null
+++ b/vendor/modernc.org/libc/fcntl/capi_linux_mips64le.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_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
+
+package fcntl
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go
new file mode 100644
index 000000000..3028e2a75
--- /dev/null
+++ b/vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go
@@ -0,0 +1,3242 @@
+// 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_illumos_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 = 0x4 // fcntl.h:395:1:
+ AT_FDCWD = 0xffd19553 // fcntl.h:390:1:
+ AT_REMOVEDIR = 0x1 // fcntl.h:393:1:
+ AT_SYMLINK_FOLLOW = 0x2000 // fcntl.h:392:1:
+ AT_SYMLINK_NOFOLLOW = 0x1000 // fcntl.h:391:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DIRECTIO_OFF = 0 // fcntl.h:351:1:
+ DIRECTIO_ON = 1 // fcntl.h:352:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_CLOEXEC = 1 // fcntl.h:345:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ F_ALLOCSP = 10 // fcntl.h:162:1:
+ F_ALLOCSP64 = 10 // fcntl.h:215:1:
+ F_BADFD = 46 // fcntl.h:234:1:
+ F_BLKSIZE = 19 // fcntl.h:139:1:
+ F_BLOCKS = 18 // fcntl.h:138:1:
+ F_CHKFL = 8 // fcntl.h:128:1:
+ F_COMPAT = 0x8 // fcntl.h:380:1:
+ F_DUP2FD = 9 // fcntl.h:129:1:
+ F_DUP2FD_CLOEXEC = 36 // fcntl.h:130:1:
+ F_DUPFD = 0 // fcntl.h:101:1:
+ F_DUPFD_CLOEXEC = 37 // fcntl.h:132:1:
+ F_FLOCK = 53 // fcntl.h:170:1:
+ F_FLOCK64 = 53 // fcntl.h:223:1:
+ F_FLOCKW = 54 // fcntl.h:171:1:
+ F_FLOCKW64 = 54 // fcntl.h:224:1:
+ F_FREESP = 11 // fcntl.h:163:1:
+ F_FREESP64 = 11 // fcntl.h:216:1:
+ F_GETFD = 1 // fcntl.h:102:1:
+ F_GETFL = 3 // fcntl.h:104:1:
+ F_GETLK = 14 // fcntl.h:164:1:
+ F_GETLK64 = 14 // fcntl.h:217:1:
+ F_GETOWN = 23 // fcntl.h:143:1:
+ F_GETXFL = 45 // fcntl.h:105:1:
+ F_HASREMOTELOCKS = 26 // fcntl.h:147:1:
+ F_ISSTREAM = 13 // fcntl.h:134:1:
+ F_MANDDNY = 0x10 // fcntl.h:381:1:
+ F_MDACC = 0x20 // fcntl.h:370:1:
+ F_NODNY = 0x0 // fcntl.h:375:1:
+ F_NPRIV = 16 // fcntl.h:136:1:
+ F_OFD_GETLK = 47 // fcntl.h:167:1:
+ F_OFD_GETLK64 = 47 // fcntl.h:220:1:
+ F_OFD_SETLK = 48 // fcntl.h:168:1:
+ F_OFD_SETLK64 = 48 // fcntl.h:221:1:
+ F_OFD_SETLKW = 49 // fcntl.h:169:1:
+ F_OFD_SETLKW64 = 49 // fcntl.h:222:1:
+ F_PRIV = 15 // fcntl.h:135:1:
+ F_QUOTACTL = 17 // fcntl.h:137:1:
+ F_RDACC = 0x1 // fcntl.h:366:1:
+ F_RDDNY = 0x1 // fcntl.h:376:1:
+ F_RDLCK = 01 // fcntl.h:334:1:
+ F_REVOKE = 25 // fcntl.h:145:1:
+ F_RMACC = 0x4 // fcntl.h:369:1:
+ F_RMDNY = 0x4 // fcntl.h:379:1:
+ F_RWACC = 0x3 // fcntl.h:368:1:
+ F_RWDNY = 0x3 // fcntl.h:378:1:
+ F_SETFD = 2 // fcntl.h:103:1:
+ F_SETFL = 4 // fcntl.h:106:1:
+ F_SETLK = 6 // fcntl.h:160:1:
+ F_SETLK64 = 6 // fcntl.h:213:1:
+ F_SETLK64_NBMAND = 42 // fcntl.h:218:1:
+ F_SETLKW = 7 // fcntl.h:161:1:
+ F_SETLKW64 = 7 // fcntl.h:214:1:
+ F_SETLK_NBMAND = 42 // fcntl.h:165:1:
+ F_SETOWN = 24 // fcntl.h:144:1:
+ F_SHARE = 40 // fcntl.h:230:1:
+ F_SHARE_NBMAND = 43 // fcntl.h:232:1:
+ F_UNLCK = 03 // fcntl.h:336:1:
+ F_UNLKSYS = 04 // fcntl.h:337:1:
+ F_UNSHARE = 41 // fcntl.h:231:1:
+ F_WRACC = 0x2 // fcntl.h:367:1:
+ F_WRDNY = 0x2 // fcntl.h:377:1:
+ F_WRLCK = 02 // fcntl.h:335:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ O_ACCMODE = 6291459 // fcntl.h:344:1:
+ O_APPEND = 0x08 // fcntl.h:65:1:
+ O_CLOEXEC = 0x800000 // fcntl.h:88:1:
+ O_CREAT = 0x100 // fcntl.h:81:1:
+ O_DIRECT = 0x2000000 // fcntl.h:93:1:
+ O_DIRECTORY = 0x1000000 // fcntl.h:90:1:
+ O_DSYNC = 0x40 // fcntl.h:69:1:
+ O_EXCL = 0x400 // fcntl.h:83:1:
+ O_EXEC = 0x400000 // fcntl.h:61:1:
+ O_LARGEFILE = 0x2000 // fcntl.h:75:1:
+ O_NDELAY = 0x04 // fcntl.h:63:1:
+ O_NOCTTY = 0x800 // fcntl.h:84:1:
+ O_NOFOLLOW = 0x20000 // fcntl.h:86:1:
+ O_NOLINKS = 0x40000 // fcntl.h:87:1:
+ O_NONBLOCK = 0x80 // fcntl.h:73:1:
+ O_RDONLY = 0 // fcntl.h:57:1:
+ O_RDWR = 2 // fcntl.h:59:1:
+ O_RSYNC = 0x8000 // fcntl.h:70:1:
+ O_SEARCH = 0x200000 // fcntl.h:60:1:
+ O_SYNC = 0x10 // fcntl.h:68:1:
+ O_TRUNC = 0x200 // fcntl.h:82:1:
+ O_WRONLY = 1 // fcntl.h:58:1:
+ O_XATTR = 0x4000 // fcntl.h:85:1:
+ POSIX_FADV_DONTNEED = 4 // fcntl.h:404:1:
+ POSIX_FADV_NOREUSE = 5 // fcntl.h:405:1:
+ POSIX_FADV_NORMAL = 0 // fcntl.h:400:1:
+ POSIX_FADV_RANDOM = 1 // fcntl.h:401:1:
+ POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:402:1:
+ POSIX_FADV_WILLNEED = 3 // fcntl.h:403:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ SEEK_DATA = 3 // fcntl.h:65:1:
+ SEEK_HOLE = 4 // fcntl.h:69:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_AT_TRIGGER = 0x2 // fcntl.h:394:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FCNTL_H = 0 // fcntl.h:33:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FCNTL_H = 0 // fcntl.h:43:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+// Copyright 2020 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Flag values accessible to open(2) and fcntl(2)
+// The first five can only be set (exclusively) by open(2).
+// defines read/write file integrity
+
+// Flag values accessible only to open(2).
+
+// fcntl(2) requests
+//
+// N.B.: values are not necessarily assigned sequentially below.
+
+// Applications that read /dev/mem must be built like the kernel. A
+// new symbol "_KMEMUSER" is defined for this purpose.
+
+// EINVAL is fildes matches arg1
+
+// Numbers 20-22 have been removed and should not be reused.
+
+// manager
+
+// Commands that refer to flock structures. The argument types differ between
+// the large and small file environments; therefore, the #defined values must
+// as well.
+// The NBMAND forms are private and should not be used.
+// The FLOCK forms are also private and should not be used.
+
+// "Native" application compilation environment
+
+// File segment locking set data type - information passed to system by user.
+
+// regular version, for both small and large file compilation environment
+type Flock = struct {
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start int64
+ Fl_len int64
+ Fl_sysid int32
+ Fl_pid int32
+ Fl_pad [4]int64
+} /* fcntl.h:241:9 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+// Copyright 2020 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Flag values accessible to open(2) and fcntl(2)
+// The first five can only be set (exclusively) by open(2).
+// defines read/write file integrity
+
+// Flag values accessible only to open(2).
+
+// fcntl(2) requests
+//
+// N.B.: values are not necessarily assigned sequentially below.
+
+// Applications that read /dev/mem must be built like the kernel. A
+// new symbol "_KMEMUSER" is defined for this purpose.
+
+// EINVAL is fildes matches arg1
+
+// Numbers 20-22 have been removed and should not be reused.
+
+// manager
+
+// Commands that refer to flock structures. The argument types differ between
+// the large and small file environments; therefore, the #defined values must
+// as well.
+// The NBMAND forms are private and should not be used.
+// The FLOCK forms are also private and should not be used.
+
+// "Native" application compilation environment
+
+// File segment locking set data type - information passed to system by user.
+
+// regular version, for both small and large file compilation environment
+type Flock_t = Flock /* fcntl.h:249:3 */
+
+// transitional large file interface version
+
+type Flock64 = struct {
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start int64
+ Fl_len int64
+ Fl_sysid int32
+ Fl_pid int32
+ Fl_pad [4]int64
+} /* fcntl.h:271:9 */
+
+// transitional large file interface version
+
+type Flock64_t = Flock64 /* fcntl.h:279:3 */
+
+// File segment locking types.
+
+// POSIX constants
+
+// Mask for file access modes
+
+// DIRECTIO
+
+// File share reservation type
+type Fshare = struct {
+ Ff_access int16
+ Ff_deny int16
+ Ff_id int32
+} /* fcntl.h:357:9 */
+
+// File segment locking types.
+
+// POSIX constants
+
+// Mask for file access modes
+
+// DIRECTIO
+
+// File share reservation type
+type Fshare_t = Fshare /* fcntl.h:361:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go
index 8de6ac32f..9bf229d62 100644
--- a/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go
+++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.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 -ignore-unsupported-alignment -o fcntl/fcntl_linux_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_linux_loong64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@@ -15,127 +15,135 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- AT_EACCESS = 0x200 // fcntl-linux.h:388:1:
- AT_FDCWD = -100 // fcntl-linux.h:371:1:
- AT_REMOVEDIR = 0x200 // fcntl-linux.h:375:1:
- AT_SYMLINK_FOLLOW = 0x400 // fcntl-linux.h:377:1:
- AT_SYMLINK_NOFOLLOW = 0x100 // fcntl-linux.h:374:1:
- FAPPEND = 1024 // fcntl-linux.h:304:1:
- FASYNC = 8192 // fcntl-linux.h:306:1:
- FD_CLOEXEC = 1 // fcntl-linux.h:219:1:
- FFSYNC = 1052672 // fcntl-linux.h:305:1:
- FNDELAY = 2048 // fcntl-linux.h:308:1:
- FNONBLOCK = 2048 // fcntl-linux.h:307:1:
- F_DUPFD = 0 // fcntl-linux.h:167:1:
- F_DUPFD_CLOEXEC = 1030 // fcntl-linux.h:214:1:
- F_EXLCK = 4 // fcntl-linux.h:231:1:
- F_GETFD = 1 // fcntl-linux.h:168:1:
- F_GETFL = 3 // fcntl-linux.h:170:1:
- F_GETLK = 5 // fcntl-linux.h:109:1:
- F_GETLK64 = 5 // fcntl.h:29:1:
- F_GETOWN = 9 // fcntl-linux.h:180:1:
- F_LOCK = 1 // fcntl.h:238:1:
- F_OK = 0 // fcntl.h:131:1:
- F_RDLCK = 0 // fcntl-linux.h:223:1:
- F_SETFD = 2 // fcntl-linux.h:169:1:
- F_SETFL = 4 // fcntl-linux.h:171:1:
- F_SETLK = 6 // fcntl-linux.h:110:1:
- F_SETLK64 = 6 // fcntl.h:30:1:
- F_SETLKW = 7 // fcntl-linux.h:111:1:
- F_SETLKW64 = 7 // fcntl.h:31:1:
- F_SETOWN = 8 // fcntl-linux.h:179:1:
- F_SHLCK = 8 // fcntl-linux.h:232:1:
- F_TEST = 3 // fcntl.h:240:1:
- F_TLOCK = 2 // fcntl.h:239:1:
- F_ULOCK = 0 // fcntl.h:237:1:
- F_UNLCK = 2 // fcntl-linux.h:225:1:
- F_WRLCK = 1 // fcntl-linux.h:224:1:
- LOCK_EX = 2 // fcntl-linux.h:238:1:
- LOCK_NB = 4 // fcntl-linux.h:239:1:
- LOCK_SH = 1 // fcntl-linux.h:237:1:
- LOCK_UN = 8 // fcntl-linux.h:241:1:
- O_ACCMODE = 0003 // fcntl-linux.h:42:1:
- O_APPEND = 02000 // fcntl-linux.h:59:1:
- O_ASYNC = 020000 // fcntl-linux.h:72:1:
- O_CLOEXEC = 524288 // fcntl-linux.h:144:1:
- O_CREAT = 0100 // fcntl-linux.h:47:1:
- O_DIRECTORY = 65536 // fcntl-linux.h:142:1:
- O_DSYNC = 4096 // fcntl-linux.h:158:1:
- O_EXCL = 0200 // fcntl-linux.h:50:1:
- O_FSYNC = 1052672 // fcntl-linux.h:70:1:
- O_NDELAY = 2048 // fcntl-linux.h:65:1:
- O_NOCTTY = 0400 // fcntl-linux.h:53:1:
- O_NOFOLLOW = 131072 // fcntl-linux.h:143:1:
- O_NONBLOCK = 04000 // fcntl-linux.h:62:1:
- O_RDONLY = 00 // fcntl-linux.h:43:1:
- O_RDWR = 02 // fcntl-linux.h:45:1:
- O_RSYNC = 1052672 // fcntl-linux.h:162:1:
- O_SYNC = 04010000 // fcntl-linux.h:68:1:
- O_TRUNC = 01000 // fcntl-linux.h:56:1:
- O_WRONLY = 01 // fcntl-linux.h:44:1:
- POSIX_FADV_DONTNEED = 4 // fcntl-linux.h:321:1:
- POSIX_FADV_NOREUSE = 5 // fcntl-linux.h:322:1:
- POSIX_FADV_NORMAL = 0 // fcntl-linux.h:317:1:
- POSIX_FADV_RANDOM = 1 // fcntl-linux.h:318:1:
- POSIX_FADV_SEQUENTIAL = 2 // fcntl-linux.h:319:1:
- POSIX_FADV_WILLNEED = 3 // fcntl-linux.h:320:1:
- R_OK = 4 // fcntl.h:128:1:
- SEEK_CUR = 1 // fcntl.h:138:1:
- SEEK_END = 2 // fcntl.h:139:1:
- SEEK_SET = 0 // fcntl.h:137:1:
- S_IFBLK = 24576 // fcntl.h:83:1:
- S_IFCHR = 8192 // fcntl.h:82:1:
- S_IFDIR = 16384 // fcntl.h:81:1:
- S_IFIFO = 4096 // fcntl.h:86:1:
- S_IFLNK = 40960 // fcntl.h:89:1:
- S_IFMT = 61440 // fcntl.h:80:1:
- S_IFREG = 32768 // fcntl.h:84:1:
- S_IFSOCK = 49152 // fcntl.h:92:1:
- S_IRGRP = 32 // fcntl.h:111:1:
- S_IROTH = 4 // fcntl.h:117:1:
- S_IRUSR = 256 // fcntl.h:105:1:
- S_IRWXG = 56 // fcntl.h:115:1:
- S_IRWXO = 7 // fcntl.h:121:1:
- S_IRWXU = 448 // fcntl.h:109:1:
- S_ISGID = 1024 // fcntl.h:98:1:
- S_ISUID = 2048 // fcntl.h:97:1:
- S_ISVTX = 512 // fcntl.h:102:1:
- S_IWGRP = 16 // fcntl.h:112:1:
- S_IWOTH = 2 // fcntl.h:118:1:
- S_IWUSR = 128 // fcntl.h:106:1:
- S_IXGRP = 8 // fcntl.h:113:1:
- S_IXOTH = 1 // fcntl.h:119:1:
- S_IXUSR = 64 // fcntl.h:107:1:
- UTIME_NOW = 1073741823 // stat.h:206:1:
- UTIME_OMIT = 1073741822 // stat.h:207:1:
- W_OK = 2 // fcntl.h:129:1:
- X_OK = 1 // fcntl.h:130:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_STAT_H = 1 // stat.h:23:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FCNTL_H = 1 // fcntl.h:23:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
- X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
- X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
- X_STAT_VER = 1 // stat.h:44:1:
- X_STAT_VER_KERNEL = 0 // stat.h:37:1:
- X_STAT_VER_LINUX = 1 // stat.h:38:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ AT_EACCESS = 0x200 // fcntl.h:166:1:
+ AT_FDCWD = -100 // fcntl.h:149:1:
+ AT_REMOVEDIR = 0x200 // fcntl.h:153:1:
+ AT_SYMLINK_FOLLOW = 0x400 // fcntl.h:155:1:
+ AT_SYMLINK_NOFOLLOW = 0x100 // fcntl.h:152:1:
+ FAPPEND = 1024 // fcntl-linux.h:306:1:
+ FASYNC = 8192 // fcntl-linux.h:308:1:
+ FD_CLOEXEC = 1 // fcntl-linux.h:219:1:
+ FFSYNC = 1052672 // fcntl-linux.h:307:1:
+ FNDELAY = 2048 // fcntl-linux.h:310:1:
+ FNONBLOCK = 2048 // fcntl-linux.h:309:1:
+ F_DUPFD = 0 // fcntl-linux.h:167:1:
+ F_DUPFD_CLOEXEC = 1030 // fcntl-linux.h:214:1:
+ F_EXLCK = 4 // fcntl-linux.h:231:1:
+ F_GETFD = 1 // fcntl-linux.h:168:1:
+ F_GETFL = 3 // fcntl-linux.h:170:1:
+ F_GETLK = 5 // fcntl-linux.h:109:1:
+ F_GETLK64 = 5 // fcntl.h:30:1:
+ F_GETOWN = 9 // fcntl-linux.h:180:1:
+ F_LOCK = 1 // fcntl.h:279:1:
+ F_OK = 0 // fcntl.h:131:1:
+ F_RDLCK = 0 // fcntl-linux.h:223:1:
+ F_SETFD = 2 // fcntl-linux.h:169:1:
+ F_SETFL = 4 // fcntl-linux.h:171:1:
+ F_SETLK = 6 // fcntl-linux.h:110:1:
+ F_SETLK64 = 6 // fcntl.h:31:1:
+ F_SETLKW = 7 // fcntl-linux.h:111:1:
+ F_SETLKW64 = 7 // fcntl.h:32:1:
+ F_SETOWN = 8 // fcntl-linux.h:179:1:
+ F_SHLCK = 8 // fcntl-linux.h:232:1:
+ F_TEST = 3 // fcntl.h:281:1:
+ F_TLOCK = 2 // fcntl.h:280:1:
+ F_ULOCK = 0 // fcntl.h:278:1:
+ F_UNLCK = 2 // fcntl-linux.h:225:1:
+ F_WRLCK = 1 // fcntl-linux.h:224:1:
+ LOCK_EX = 2 // fcntl-linux.h:238:1:
+ LOCK_NB = 4 // fcntl-linux.h:239:1:
+ LOCK_SH = 1 // fcntl-linux.h:237:1:
+ LOCK_UN = 8 // fcntl-linux.h:241:1:
+ O_ACCMODE = 0003 // fcntl-linux.h:42:1:
+ O_APPEND = 02000 // fcntl-linux.h:59:1:
+ O_ASYNC = 020000 // fcntl-linux.h:72:1:
+ O_CLOEXEC = 524288 // fcntl-linux.h:144:1:
+ O_CREAT = 0100 // fcntl-linux.h:47:1:
+ O_DIRECTORY = 65536 // fcntl-linux.h:142:1:
+ O_DSYNC = 4096 // fcntl-linux.h:158:1:
+ O_EXCL = 0200 // fcntl-linux.h:50:1:
+ O_FSYNC = 1052672 // fcntl-linux.h:70:1:
+ O_NDELAY = 2048 // fcntl-linux.h:65:1:
+ O_NOCTTY = 0400 // fcntl-linux.h:53:1:
+ O_NOFOLLOW = 131072 // fcntl-linux.h:143:1:
+ O_NONBLOCK = 04000 // fcntl-linux.h:62:1:
+ O_RDONLY = 00 // fcntl-linux.h:43:1:
+ O_RDWR = 02 // fcntl-linux.h:45:1:
+ O_RSYNC = 1052672 // fcntl-linux.h:162:1:
+ O_SYNC = 04010000 // fcntl-linux.h:68:1:
+ O_TRUNC = 01000 // fcntl-linux.h:56:1:
+ O_WRONLY = 01 // fcntl-linux.h:44:1:
+ POSIX_FADV_DONTNEED = 4 // fcntl-linux.h:323:1:
+ POSIX_FADV_NOREUSE = 5 // fcntl-linux.h:324:1:
+ POSIX_FADV_NORMAL = 0 // fcntl-linux.h:319:1:
+ POSIX_FADV_RANDOM = 1 // fcntl-linux.h:320:1:
+ POSIX_FADV_SEQUENTIAL = 2 // fcntl-linux.h:321:1:
+ POSIX_FADV_WILLNEED = 3 // fcntl-linux.h:322:1:
+ R_OK = 4 // fcntl.h:128:1:
+ SEEK_CUR = 1 // fcntl.h:138:1:
+ SEEK_END = 2 // fcntl.h:139:1:
+ SEEK_SET = 0 // fcntl.h:137:1:
+ S_IFBLK = 24576 // fcntl.h:83:1:
+ S_IFCHR = 8192 // fcntl.h:82:1:
+ S_IFDIR = 16384 // fcntl.h:81:1:
+ S_IFIFO = 4096 // fcntl.h:86:1:
+ S_IFLNK = 40960 // fcntl.h:89:1:
+ S_IFMT = 61440 // fcntl.h:80:1:
+ S_IFREG = 32768 // fcntl.h:84:1:
+ S_IFSOCK = 49152 // fcntl.h:92:1:
+ S_IRGRP = 32 // fcntl.h:111:1:
+ S_IROTH = 4 // fcntl.h:117:1:
+ S_IRUSR = 256 // fcntl.h:105:1:
+ S_IRWXG = 56 // fcntl.h:115:1:
+ S_IRWXO = 7 // fcntl.h:121:1:
+ S_IRWXU = 448 // fcntl.h:109:1:
+ S_ISGID = 1024 // fcntl.h:98:1:
+ S_ISUID = 2048 // fcntl.h:97:1:
+ S_ISVTX = 512 // fcntl.h:102:1:
+ S_IWGRP = 16 // fcntl.h:112:1:
+ S_IWOTH = 2 // fcntl.h:118:1:
+ S_IWUSR = 128 // fcntl.h:106:1:
+ S_IXGRP = 8 // fcntl.h:113:1:
+ S_IXOTH = 1 // fcntl.h:119:1:
+ S_IXUSR = 64 // fcntl.h:107:1:
+ UTIME_NOW = 1073741823 // stat.h:56:1:
+ UTIME_OMIT = 1073741822 // stat.h:57:1:
+ W_OK = 2 // fcntl.h:129:1:
+ X_OK = 1 // fcntl.h:130:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_STRUCT_STAT_H = 1 // struct_stat.h:24:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FCNTL_H = 1 // fcntl.h:23:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STATBUF_ST_BLKSIZE = 0 // struct_stat.h:122:1:
+ X_STATBUF_ST_NSEC = 0 // struct_stat.h:125:1:
+ X_STATBUF_ST_RDEV = 0 // struct_stat.h:123:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -156,7 +164,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -175,7 +183,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -207,6 +215,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -222,12 +232,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -268,6 +281,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -338,6 +353,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -356,9 +427,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -386,7 +463,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -407,23 +485,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -436,6 +515,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -456,8 +537,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -467,6 +548,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -495,8 +579,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -527,11 +616,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -541,11 +633,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -579,6 +687,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -592,6 +716,23 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
@@ -601,7 +742,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -620,7 +761,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -637,11 +778,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -658,7 +813,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -677,14 +832,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -724,8 +879,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -739,14 +894,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -757,10 +910,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -787,7 +942,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -799,60 +954,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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
@@ -860,8 +1016,25 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
-// O_*, F_*, FD_* bit values for Linux/x86.
-// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// O_*, F_*, FD_* bit values for the generic Linux/LoongArch ABI.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -878,21 +1051,22 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Not necessary, we always have 64-bit offsets.
+// In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as
+// non-64-bit versions. It will need to be revised for 128-bit.
type Flock = struct {
Fl_type int16
Fl_whence int16
F__ccgo_pad1 [4]byte
- Fl_start X__off64_t
- Fl_len X__off64_t
- Fl_pid X__pid_t
+ Fl_start int64
+ Fl_len int64
+ Fl_pid int32
F__ccgo_pad2 [4]byte
} /* fcntl.h:35:1 */
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
-// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// Copyright (C) 2001-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -955,8 +1129,6 @@ type Flock = struct {
// Advise to `posix_fadvise'.
-// Values for `*at' functions.
-
// Detect if open needs mode as a third argument (or for openat as a fourth
// argument).
@@ -964,17 +1136,17 @@ type Flock = struct {
//
// 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 Mode_t = uint32 /* fcntl.h:50:18 */
-type Off_t = X__off64_t /* fcntl.h:58:19 */
+type Off_t = int64 /* fcntl.h:58:19 */
-type Pid_t = X__pid_t /* fcntl.h:69:17 */
+type Pid_t = int32 /* fcntl.h:69:17 */
// For XPG all symbols from <sys/stat.h> should also be available.
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -994,7 +1166,7 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1021,20 +1193,43 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = int64 /* time_t.h:10:18 */
+
// POSIX.1b structure for a time value. This is like a `struct timeval' but
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1051,36 +1246,86 @@ type Timespec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Versions of the `struct stat' data structure.
+// Definition for struct stat.
+// Copyright (C) 2020-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
-// x86-64 versions of the `xmknod' interface.
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
type Stat = struct {
- Fst_dev X__dev_t
- Fst_ino X__ino_t
- Fst_nlink X__nlink_t
- Fst_mode X__mode_t
- Fst_uid X__uid_t
- Fst_gid X__gid_t
- F__pad0 int32
- Fst_rdev X__dev_t
- Fst_size X__off_t
- Fst_blksize X__blksize_t
- Fst_blocks X__blkcnt_t
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ F__pad1 uint64
+ Fst_size int64
+ Fst_blksize int32
+ F__pad2 int32
+ Fst_blocks int64
Fst_atim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_mtim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_ctim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
- F__glibc_reserved [3]X__syscall_slong_t
-} /* stat.h:46:1 */
+ F__glibc_reserved [2]int32
+} /* struct_stat.h:44:1 */
// Define some inlines helping to catch common problems.
diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_mips64le.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_mips64le.go
new file mode 100644
index 000000000..8de6ac32f
--- /dev/null
+++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_mips64le.go
@@ -0,0 +1,1087 @@
+// 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_linux_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 = 0x200 // fcntl-linux.h:388:1:
+ AT_FDCWD = -100 // fcntl-linux.h:371:1:
+ AT_REMOVEDIR = 0x200 // fcntl-linux.h:375:1:
+ AT_SYMLINK_FOLLOW = 0x400 // fcntl-linux.h:377:1:
+ AT_SYMLINK_NOFOLLOW = 0x100 // fcntl-linux.h:374:1:
+ FAPPEND = 1024 // fcntl-linux.h:304:1:
+ FASYNC = 8192 // fcntl-linux.h:306:1:
+ FD_CLOEXEC = 1 // fcntl-linux.h:219:1:
+ FFSYNC = 1052672 // fcntl-linux.h:305:1:
+ FNDELAY = 2048 // fcntl-linux.h:308:1:
+ FNONBLOCK = 2048 // fcntl-linux.h:307:1:
+ F_DUPFD = 0 // fcntl-linux.h:167:1:
+ F_DUPFD_CLOEXEC = 1030 // fcntl-linux.h:214:1:
+ F_EXLCK = 4 // fcntl-linux.h:231:1:
+ F_GETFD = 1 // fcntl-linux.h:168:1:
+ F_GETFL = 3 // fcntl-linux.h:170:1:
+ F_GETLK = 5 // fcntl-linux.h:109:1:
+ F_GETLK64 = 5 // fcntl.h:29:1:
+ F_GETOWN = 9 // fcntl-linux.h:180:1:
+ F_LOCK = 1 // fcntl.h:238:1:
+ F_OK = 0 // fcntl.h:131:1:
+ F_RDLCK = 0 // fcntl-linux.h:223:1:
+ F_SETFD = 2 // fcntl-linux.h:169:1:
+ F_SETFL = 4 // fcntl-linux.h:171:1:
+ F_SETLK = 6 // fcntl-linux.h:110:1:
+ F_SETLK64 = 6 // fcntl.h:30:1:
+ F_SETLKW = 7 // fcntl-linux.h:111:1:
+ F_SETLKW64 = 7 // fcntl.h:31:1:
+ F_SETOWN = 8 // fcntl-linux.h:179:1:
+ F_SHLCK = 8 // fcntl-linux.h:232:1:
+ F_TEST = 3 // fcntl.h:240:1:
+ F_TLOCK = 2 // fcntl.h:239:1:
+ F_ULOCK = 0 // fcntl.h:237:1:
+ F_UNLCK = 2 // fcntl-linux.h:225:1:
+ F_WRLCK = 1 // fcntl-linux.h:224:1:
+ LOCK_EX = 2 // fcntl-linux.h:238:1:
+ LOCK_NB = 4 // fcntl-linux.h:239:1:
+ LOCK_SH = 1 // fcntl-linux.h:237:1:
+ LOCK_UN = 8 // fcntl-linux.h:241:1:
+ O_ACCMODE = 0003 // fcntl-linux.h:42:1:
+ O_APPEND = 02000 // fcntl-linux.h:59:1:
+ O_ASYNC = 020000 // fcntl-linux.h:72:1:
+ O_CLOEXEC = 524288 // fcntl-linux.h:144:1:
+ O_CREAT = 0100 // fcntl-linux.h:47:1:
+ O_DIRECTORY = 65536 // fcntl-linux.h:142:1:
+ O_DSYNC = 4096 // fcntl-linux.h:158:1:
+ O_EXCL = 0200 // fcntl-linux.h:50:1:
+ O_FSYNC = 1052672 // fcntl-linux.h:70:1:
+ O_NDELAY = 2048 // fcntl-linux.h:65:1:
+ O_NOCTTY = 0400 // fcntl-linux.h:53:1:
+ O_NOFOLLOW = 131072 // fcntl-linux.h:143:1:
+ O_NONBLOCK = 04000 // fcntl-linux.h:62:1:
+ O_RDONLY = 00 // fcntl-linux.h:43:1:
+ O_RDWR = 02 // fcntl-linux.h:45:1:
+ O_RSYNC = 1052672 // fcntl-linux.h:162:1:
+ O_SYNC = 04010000 // fcntl-linux.h:68:1:
+ O_TRUNC = 01000 // fcntl-linux.h:56:1:
+ O_WRONLY = 01 // fcntl-linux.h:44:1:
+ POSIX_FADV_DONTNEED = 4 // fcntl-linux.h:321:1:
+ POSIX_FADV_NOREUSE = 5 // fcntl-linux.h:322:1:
+ POSIX_FADV_NORMAL = 0 // fcntl-linux.h:317:1:
+ POSIX_FADV_RANDOM = 1 // fcntl-linux.h:318:1:
+ POSIX_FADV_SEQUENTIAL = 2 // fcntl-linux.h:319:1:
+ POSIX_FADV_WILLNEED = 3 // fcntl-linux.h:320:1:
+ R_OK = 4 // fcntl.h:128:1:
+ SEEK_CUR = 1 // fcntl.h:138:1:
+ SEEK_END = 2 // fcntl.h:139:1:
+ SEEK_SET = 0 // fcntl.h:137:1:
+ S_IFBLK = 24576 // fcntl.h:83:1:
+ S_IFCHR = 8192 // fcntl.h:82:1:
+ S_IFDIR = 16384 // fcntl.h:81:1:
+ S_IFIFO = 4096 // fcntl.h:86:1:
+ S_IFLNK = 40960 // fcntl.h:89:1:
+ S_IFMT = 61440 // fcntl.h:80:1:
+ S_IFREG = 32768 // fcntl.h:84:1:
+ S_IFSOCK = 49152 // fcntl.h:92:1:
+ S_IRGRP = 32 // fcntl.h:111:1:
+ S_IROTH = 4 // fcntl.h:117:1:
+ S_IRUSR = 256 // fcntl.h:105:1:
+ S_IRWXG = 56 // fcntl.h:115:1:
+ S_IRWXO = 7 // fcntl.h:121:1:
+ S_IRWXU = 448 // fcntl.h:109:1:
+ S_ISGID = 1024 // fcntl.h:98:1:
+ S_ISUID = 2048 // fcntl.h:97:1:
+ S_ISVTX = 512 // fcntl.h:102:1:
+ S_IWGRP = 16 // fcntl.h:112:1:
+ S_IWOTH = 2 // fcntl.h:118:1:
+ S_IWUSR = 128 // fcntl.h:106:1:
+ S_IXGRP = 8 // fcntl.h:113:1:
+ S_IXOTH = 1 // fcntl.h:119:1:
+ S_IXUSR = 64 // fcntl.h:107:1:
+ UTIME_NOW = 1073741823 // stat.h:206:1:
+ UTIME_OMIT = 1073741822 // stat.h:207:1:
+ W_OK = 2 // fcntl.h:129:1:
+ X_OK = 1 // fcntl.h:130:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FCNTL_H = 1 // fcntl.h:23:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
+ X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
+ X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
+ X_STAT_VER = 1 // stat.h:44:1:
+ X_STAT_VER_KERNEL = 0 // stat.h:37:1:
+ X_STAT_VER_LINUX = 1 // stat.h:38:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 6.5 File Control Operations <fcntl.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// This must be early so <bits/fcntl.h> can define types winningly.
+
+// Get __mode_t, __dev_t and __off_t .
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// Get the definitions of O_*, F_*, FD_*: all the
+// numbers and flag bits for `open', `fcntl', et al.
+// O_*, F_*, FD_* bit values for Linux/x86.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Not necessary, we always have 64-bit offsets.
+
+type Flock = struct {
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start X__off64_t
+ Fl_len X__off64_t
+ Fl_pid X__pid_t
+ F__ccgo_pad2 [4]byte
+} /* fcntl.h:35:1 */
+
+// Include generic Linux declarations.
+// O_*, F_*, FD_* bit values for Linux.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This file contains shared definitions between Linux architectures
+// and is included by <bits/fcntl.h> to declare them. The various
+// #ifndef cases allow the architecture specific file to define those
+// values with different values.
+//
+// A minimal <bits/fcntl.h> contains just:
+//
+// struct flock {...}
+// #ifdef __USE_LARGEFILE64
+// struct flock64 {...}
+// #endif
+// #include <bits/fcntl-linux.h>
+
+// open/fcntl.
+
+// open file description locks.
+//
+// Usually record locks held by a process are released on *any* close and are
+// not inherited across a fork.
+//
+// These cmd values will set locks that conflict with process-associated record
+// locks, but are "owned" by the opened file description, not the process.
+// This means that they are inherited across fork or clone with CLONE_FILES
+// like BSD (flock) locks, and they are only released automatically when the
+// last reference to the the file description against which they were acquired
+// is put.
+
+// For now, Linux has no separate synchronicity options for read
+// operations. We define O_RSYNC therefore as the same as O_SYNC
+// since this is a superset.
+
+// Values for the second argument to `fcntl'.
+
+// For F_[GET|SET]FD.
+
+// For posix fcntl() and `l_type' field of a `struct flock' for lockf().
+
+// For old implementation of BSD flock.
+
+// Operations for BSD flock, also used by the kernel implementation.
+
+// Define some more compatibility macros to be backward compatible with
+// BSD systems which did not managed to hide these kernel macros.
+
+// Advise to `posix_fadvise'.
+
+// Values for `*at' functions.
+
+// Detect if open needs mode as a third argument (or for openat as a fourth
+// 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.
+type Mode_t = X__mode_t /* fcntl.h:50:18 */
+
+type Off_t = X__off64_t /* fcntl.h:58:19 */
+
+type Pid_t = X__pid_t /* fcntl.h:69:17 */
+
+// For XPG all symbols from <sys/stat.h> should also be available.
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Versions of the `struct stat' data structure.
+
+// x86-64 versions of the `xmknod' interface.
+
+type Stat = struct {
+ Fst_dev X__dev_t
+ Fst_ino X__ino_t
+ Fst_nlink X__nlink_t
+ Fst_mode X__mode_t
+ Fst_uid X__uid_t
+ Fst_gid X__gid_t
+ F__pad0 int32
+ Fst_rdev X__dev_t
+ Fst_size X__off_t
+ Fst_blksize X__blksize_t
+ Fst_blocks X__blkcnt_t
+ Fst_atim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_mtim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_ctim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ F__glibc_reserved [3]X__syscall_slong_t
+} /* stat.h:46:1 */
+
+// Define some inlines helping to catch common problems.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/fts/capi_illumos_amd64.go b/vendor/modernc.org/libc/fts/capi_illumos_amd64.go
new file mode 100644
index 000000000..d83fad159
--- /dev/null
+++ b/vendor/modernc.org/libc/fts/capi_illumos_amd64.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_illumos_amd64.go -pkgname fts', DO NOT EDIT.
+
+package fts
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/fts/capi_linux_loong64.go b/vendor/modernc.org/libc/fts/capi_linux_loong64.go
index 5dc389ba0..d782e0c34 100644
--- a/vendor/modernc.org/libc/fts/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/fts/capi_linux_loong64.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 -ignore-unsupported-alignment -o fts/fts_linux_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_linux_loong64.go -pkgname fts', DO NOT EDIT.
package fts
diff --git a/vendor/modernc.org/libc/fts/capi_linux_mips64le.go b/vendor/modernc.org/libc/fts/capi_linux_mips64le.go
new file mode 100644
index 000000000..5dc389ba0
--- /dev/null
+++ b/vendor/modernc.org/libc/fts/capi_linux_mips64le.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_linux_amd64.go -pkgname fts', DO NOT EDIT.
+
+package fts
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/fts/fts_illumos_amd64.go b/vendor/modernc.org/libc/fts/fts_illumos_amd64.go
new file mode 100644
index 000000000..a36cc52c3
--- /dev/null
+++ b/vendor/modernc.org/libc/fts/fts_illumos_amd64.go
@@ -0,0 +1,3038 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FTS_AGAIN = 1 // fts.h:103:1:
+ FTS_COMFOLLOW = 0x0001 // fts.h:48:1:
+ FTS_D = 1 // fts.h:84:1:
+ FTS_DC = 2 // fts.h:85:1:
+ FTS_DEFAULT = 3 // fts.h:86:1:
+ FTS_DNR = 4 // fts.h:87:1:
+ FTS_DONTCHDIR = 0x01 // fts.h:99:1:
+ FTS_DOT = 5 // fts.h:88:1:
+ FTS_DP = 6 // fts.h:89:1:
+ FTS_ERR = 7 // fts.h:90:1:
+ FTS_F = 8 // fts.h:91:1:
+ FTS_FOLLOW = 2 // fts.h:104:1:
+ FTS_INIT = 9 // fts.h:92:1:
+ FTS_LOGICAL = 0x0002 // fts.h:49:1:
+ FTS_MAXLEVEL = 0x7fffffff // fts.h:81:1:
+ FTS_NAMEONLY = 0x1000 // fts.h:57:1:
+ FTS_NOCHDIR = 0x0004 // fts.h:50:1:
+ FTS_NOINSTR = 3 // fts.h:105:1:
+ FTS_NOSTAT = 0x0008 // fts.h:51:1:
+ FTS_NS = 10 // fts.h:93:1:
+ FTS_NSOK = 11 // fts.h:94:1:
+ FTS_OPTIONMASK = 0x00ff // fts.h:55:1:
+ FTS_PHYSICAL = 0x0010 // fts.h:52:1:
+ FTS_ROOTLEVEL = 0 // fts.h:80:1:
+ FTS_ROOTPARENTLEVEL = -1 // fts.h:79:1:
+ FTS_SEEDOT = 0x0020 // fts.h:53:1:
+ FTS_SKIP = 4 // fts.h:106:1:
+ FTS_SL = 12 // fts.h:95:1:
+ FTS_SLNONE = 13 // fts.h:96:1:
+ FTS_STOP = 0x2000 // fts.h:58:1:
+ FTS_SYMFOLLOW = 0x02 // fts.h:100:1:
+ FTS_XDEV = 0x0040 // fts.h:54:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ S_ENFMT = 1024 // stat.h:426:1:
+ S_IAMB = 0x1FF // stat.h:406:1:
+ S_IEXEC = 00100 // stat.h:425:1:
+ S_IFBLK = 0x6000 // stat.h:414:1:
+ S_IFCHR = 0x2000 // stat.h:408:1:
+ S_IFDIR = 0x4000 // stat.h:409:1:
+ S_IFDOOR = 0xD000 // stat.h:418:1:
+ S_IFIFO = 0x1000 // stat.h:407:1:
+ S_IFLNK = 0xA000 // stat.h:416:1:
+ S_IFMT = 0xF000 // stat.h:405:1:
+ S_IFNAM = 0x5000 // stat.h:411:1:
+ S_IFPORT = 0xE000 // stat.h:419:1:
+ S_IFREG = 0x8000 // stat.h:415:1:
+ S_IFSOCK = 0xC000 // stat.h:417:1:
+ S_INSEM = 0x1 // stat.h:412:1:
+ S_INSHD = 0x2 // stat.h:413:1:
+ S_IREAD = 00400 // stat.h:423:1:
+ S_IRGRP = 00040 // stat.h:435:1:
+ S_IROTH = 00004 // stat.h:439:1:
+ S_IRUSR = 00400 // stat.h:431:1:
+ S_IRWXG = 00070 // stat.h:434:1:
+ S_IRWXO = 00007 // stat.h:438:1:
+ S_IRWXU = 00700 // stat.h:430:1:
+ S_ISGID = 0x400 // stat.h:421:1:
+ S_ISUID = 0x800 // stat.h:420:1:
+ S_ISVTX = 0x200 // stat.h:422:1:
+ S_IWGRP = 00020 // stat.h:436:1:
+ S_IWOTH = 00002 // stat.h:440:1:
+ S_IWRITE = 00200 // stat.h:424:1:
+ S_IWUSR = 00200 // stat.h:432:1:
+ S_IXGRP = 00010 // stat.h:437:1:
+ S_IXOTH = 00001 // stat.h:441:1:
+ S_IXUSR = 00100 // stat.h:433:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ UTIME_NOW = -1 // stat.h:478:1:
+ UTIME_OMIT = -2 // stat.h:479:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_FTS_H = 0 // fts.h:31:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_ST_FSTYPSZ = 16 // stat.h:60:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_STAT_H = 0 // stat.h:32:1:
+ X_SYS_STAT_IMPL_H = 0 // stat_impl.h:28:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
+// Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// The implementation specific header <sys/time_impl.h> includes a
+// definition for timestruc_t needed by the stat structure. However,
+// including either <time.h>, which includes <sys/time_impl.h>, or
+// including <sys/time_impl.h> directly will break both X/Open and
+// POSIX namespace. Preceeding tag, structure, and structure member
+// names with underscores eliminates the namespace breakage and at the
+// same time, with unique type names, eliminates the possibility of
+// timespec_t or timestruct_t naming conflicts that could otherwise
+// result based on the order of inclusion of <sys/stat.h> and
+// <sys/time.h>. The header <sys/time_std_impl.h> contains the
+// standards namespace safe versions of these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// stat structure, used by stat(2) and fstat(2)
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, map large file interfaces
+// back to native versions where possible.
+
+// User level stat structure definitions.
+
+type Stat = struct {
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ Fst_size int64
+ Fst_atim Timestruc_t
+ Fst_mtim Timestruc_t
+ Fst_ctim Timestruc_t
+ Fst_blksize int32
+ F__ccgo_pad1 [4]byte
+ Fst_blocks int64
+ Fst_fstype [16]int8
+} /* stat.h:217:1 */
+
+// transitional large file interface version
+
+type Stat64 = struct {
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ Fst_size int64
+ Fst_atim Timestruc_t
+ Fst_mtim Timestruc_t
+ Fst_ctim Timestruc_t
+ Fst_blksize int32
+ F__ccgo_pad1 [4]byte
+ Fst_blocks int64
+ Fst_fstype [16]int8
+} /* stat.h:278:1 */
+
+// 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.
+
+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 uint64
+ Ffts_namelen uint64
+ Ffts_ino uint64
+ Ffts_dev uint64
+ Ffts_nlink uint32
+ 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 [7]byte
+} /* fts.h:38:2 */
+
+// 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.
+
+type FTS = struct {
+ Ffts_cur uintptr
+ Ffts_child uintptr
+ Ffts_array uintptr
+ Ffts_dev uint64
+ Ffts_path uintptr
+ Ffts_rfd int32
+ F__ccgo_pad1 [4]byte
+ Ffts_pathlen uint64
+ Ffts_nitems int32
+ F__ccgo_pad2 [4]byte
+ Ffts_compar uintptr
+ Ffts_options int32
+ F__ccgo_pad3 [4]byte
+} /* fts.h:60:3 */
+
+type FTSENT = X_ftsent /* fts.h:113:3 */
+
+var _ int8 /* gen.c:5:13: */
diff --git a/vendor/modernc.org/libc/fts/fts_linux_loong64.go b/vendor/modernc.org/libc/fts/fts_linux_loong64.go
index e12eb02cb..6e7ba205d 100644
--- a/vendor/modernc.org/libc/fts/fts_linux_loong64.go
+++ b/vendor/modernc.org/libc/fts/fts_linux_loong64.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 -ignore-unsupported-alignment -o fts/fts_linux_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_linux_loong64.go -pkgname fts', DO NOT EDIT.
package fts
@@ -15,127 +15,134 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- ACCESSPERMS = 511 // stat.h:195:1:
- ALLPERMS = 4095 // stat.h:196:1:
- BIG_ENDIAN = 4321 // endian.h:28:1:
- BYTE_ORDER = 1234 // endian.h:30:1:
- DEFFILEMODE = 438 // stat.h:197:1:
- FD_SETSIZE = 1024 // select.h:73:1:
- FTS_AGAIN = 1 // fts.h:139:1:
- FTS_COMFOLLOW = 0x0001 // fts.h:68:1:
- FTS_D = 1 // fts.h:119:1:
- FTS_DC = 2 // fts.h:120:1:
- FTS_DEFAULT = 3 // fts.h:121:1:
- FTS_DNR = 4 // fts.h:122:1:
- FTS_DONTCHDIR = 0x01 // fts.h:135:1:
- FTS_DOT = 5 // fts.h:123:1:
- FTS_DP = 6 // fts.h:124:1:
- FTS_ERR = 7 // fts.h:125:1:
- FTS_F = 8 // fts.h:126:1:
- FTS_FOLLOW = 2 // fts.h:140:1:
- FTS_INIT = 9 // fts.h:127:1:
- FTS_LOGICAL = 0x0002 // fts.h:69:1:
- FTS_NAMEONLY = 0x0100 // fts.h:78:1:
- FTS_NOCHDIR = 0x0004 // fts.h:70:1:
- FTS_NOINSTR = 3 // fts.h:141:1:
- FTS_NOSTAT = 0x0008 // fts.h:71:1:
- FTS_NS = 10 // fts.h:128:1:
- FTS_NSOK = 11 // fts.h:129:1:
- FTS_OPTIONMASK = 0x00ff // fts.h:76:1:
- FTS_PHYSICAL = 0x0010 // fts.h:72:1:
- FTS_ROOTLEVEL = 0 // fts.h:116:1:
- FTS_ROOTPARENTLEVEL = -1 // fts.h:115:1:
- FTS_SEEDOT = 0x0020 // fts.h:73:1:
- FTS_SKIP = 4 // fts.h:142:1:
- FTS_SL = 12 // fts.h:130:1:
- FTS_SLNONE = 13 // fts.h:131:1:
- FTS_STOP = 0x0200 // fts.h:79:1:
- FTS_SYMFOLLOW = 0x02 // fts.h:136:1:
- FTS_W = 14 // fts.h:132:1:
- FTS_WHITEOUT = 0x0080 // fts.h:75:1:
- FTS_XDEV = 0x0040 // fts.h:74:1:
- LITTLE_ENDIAN = 1234 // endian.h:27:1:
- PDP_ENDIAN = 3412 // endian.h:29:1:
- S_BLKSIZE = 512 // stat.h:199:1:
- S_IEXEC = 64 // stat.h:177:1:
- S_IFBLK = 24576 // stat.h:107:1:
- S_IFCHR = 8192 // stat.h:106:1:
- S_IFDIR = 16384 // stat.h:105:1:
- S_IFIFO = 4096 // stat.h:110:1:
- S_IFLNK = 40960 // stat.h:113:1:
- S_IFMT = 61440 // stat.h:104:1:
- S_IFREG = 32768 // stat.h:108:1:
- S_IFSOCK = 49152 // stat.h:117:1:
- S_IREAD = 256 // stat.h:175:1:
- S_IRGRP = 32 // stat.h:180:1:
- S_IROTH = 4 // stat.h:186:1:
- S_IRUSR = 256 // stat.h:168:1:
- S_IRWXG = 56 // stat.h:184:1:
- S_IRWXO = 7 // stat.h:190:1:
- S_IRWXU = 448 // stat.h:172:1:
- S_ISGID = 1024 // stat.h:161:1:
- S_ISUID = 2048 // stat.h:160:1:
- S_ISVTX = 512 // stat.h:165:1:
- S_IWGRP = 16 // stat.h:181:1:
- S_IWOTH = 2 // stat.h:187:1:
- S_IWRITE = 128 // stat.h:176:1:
- S_IWUSR = 128 // stat.h:169:1:
- S_IXGRP = 8 // stat.h:182:1:
- S_IXOTH = 1 // stat.h:188:1:
- S_IXUSR = 64 // stat.h:170:1:
- UTIME_NOW = 1073741823 // stat.h:206:1:
- UTIME_OMIT = 1073741822 // stat.h:207:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_STAT_H = 1 // stat.h:23:1:
- X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ENDIAN_H = 1 // endian.h:19:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_FTS_H = 1 // fts.h:51:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_MKNOD_VER = 0 // stat.h:390:1:
- X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
- X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
- X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
- X_STAT_VER = 1 // stat.h:44:1:
- X_STAT_VER_KERNEL = 0 // stat.h:37:1:
- X_STAT_VER_LINUX = 1 // stat.h:38:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_STAT_H = 1 // stat.h:23:1:
- X_SYS_TYPES_H = 1 // types.h:23:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ ACCESSPERMS = 511 // stat.h:195:1:
+ ALLPERMS = 4095 // stat.h:196:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ DEFFILEMODE = 438 // stat.h:197:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FTS_AGAIN = 1 // fts.h:139:1:
+ FTS_COMFOLLOW = 0x0001 // fts.h:68:1:
+ FTS_D = 1 // fts.h:119:1:
+ FTS_DC = 2 // fts.h:120:1:
+ FTS_DEFAULT = 3 // fts.h:121:1:
+ FTS_DNR = 4 // fts.h:122:1:
+ FTS_DONTCHDIR = 0x01 // fts.h:135:1:
+ FTS_DOT = 5 // fts.h:123:1:
+ FTS_DP = 6 // fts.h:124:1:
+ FTS_ERR = 7 // fts.h:125:1:
+ FTS_F = 8 // fts.h:126:1:
+ FTS_FOLLOW = 2 // fts.h:140:1:
+ FTS_INIT = 9 // fts.h:127:1:
+ FTS_LOGICAL = 0x0002 // fts.h:69:1:
+ FTS_NAMEONLY = 0x0100 // fts.h:78:1:
+ FTS_NOCHDIR = 0x0004 // fts.h:70:1:
+ FTS_NOINSTR = 3 // fts.h:141:1:
+ FTS_NOSTAT = 0x0008 // fts.h:71:1:
+ FTS_NS = 10 // fts.h:128:1:
+ FTS_NSOK = 11 // fts.h:129:1:
+ FTS_OPTIONMASK = 0x00ff // fts.h:76:1:
+ FTS_PHYSICAL = 0x0010 // fts.h:72:1:
+ FTS_ROOTLEVEL = 0 // fts.h:116:1:
+ FTS_ROOTPARENTLEVEL = -1 // fts.h:115:1:
+ FTS_SEEDOT = 0x0020 // fts.h:73:1:
+ FTS_SKIP = 4 // fts.h:142:1:
+ FTS_SL = 12 // fts.h:130:1:
+ FTS_SLNONE = 13 // fts.h:131:1:
+ FTS_STOP = 0x0200 // fts.h:79:1:
+ FTS_SYMFOLLOW = 0x02 // fts.h:136:1:
+ FTS_W = 14 // fts.h:132:1:
+ FTS_WHITEOUT = 0x0080 // fts.h:75:1:
+ FTS_XDEV = 0x0040 // fts.h:74:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ S_BLKSIZE = 512 // stat.h:199:1:
+ S_IEXEC = 64 // stat.h:177:1:
+ S_IFBLK = 24576 // stat.h:107:1:
+ S_IFCHR = 8192 // stat.h:106:1:
+ S_IFDIR = 16384 // stat.h:105:1:
+ S_IFIFO = 4096 // stat.h:110:1:
+ S_IFLNK = 40960 // stat.h:113:1:
+ S_IFMT = 61440 // stat.h:104:1:
+ S_IFREG = 32768 // stat.h:108:1:
+ S_IFSOCK = 49152 // stat.h:117:1:
+ S_IREAD = 256 // stat.h:175:1:
+ S_IRGRP = 32 // stat.h:180:1:
+ S_IROTH = 4 // stat.h:186:1:
+ S_IRUSR = 256 // stat.h:168:1:
+ S_IRWXG = 56 // stat.h:184:1:
+ S_IRWXO = 7 // stat.h:190:1:
+ S_IRWXU = 448 // stat.h:172:1:
+ S_ISGID = 1024 // stat.h:161:1:
+ S_ISUID = 2048 // stat.h:160:1:
+ S_ISVTX = 512 // stat.h:165:1:
+ S_IWGRP = 16 // stat.h:181:1:
+ S_IWOTH = 2 // stat.h:187:1:
+ S_IWRITE = 128 // stat.h:176:1:
+ S_IWUSR = 128 // stat.h:169:1:
+ S_IXGRP = 8 // stat.h:182:1:
+ S_IXOTH = 1 // stat.h:188:1:
+ S_IXUSR = 64 // stat.h:170:1:
+ UTIME_NOW = 1073741823 // stat.h:56:1:
+ UTIME_OMIT = 1073741822 // stat.h:57:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_STRUCT_STAT_H = 1 // struct_stat.h:24:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FTS_H = 1 // fts.h:51:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STATBUF_ST_BLKSIZE = 0 // struct_stat.h:122:1:
+ X_STATBUF_ST_NSEC = 0 // struct_stat.h:125:1:
+ X_STATBUF_ST_RDEV = 0 // struct_stat.h:123:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_STAT_H = 1 // stat.h:23:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -156,7 +163,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -175,7 +182,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -207,6 +214,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -222,12 +231,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -268,6 +280,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -338,6 +352,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -356,9 +426,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -386,7 +462,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -407,23 +484,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -436,6 +514,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -456,8 +536,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -467,6 +547,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -495,8 +578,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -527,11 +615,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -541,11 +632,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -579,6 +686,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -592,13 +715,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -617,7 +757,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -634,11 +774,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -655,7 +809,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -674,14 +828,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -721,8 +875,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -736,14 +890,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -754,10 +906,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -784,7 +938,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -796,101 +950,102 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -910,10 +1065,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -933,10 +1088,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -956,10 +1111,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -979,7 +1134,7 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -999,7 +1154,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1017,7 +1172,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1036,22 +1191,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1070,7 +1225,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1089,7 +1244,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1109,7 +1264,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1126,9 +1281,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1140,7 +1294,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1163,14 +1317,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1190,7 +1344,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1211,11 +1365,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -1224,25 +1378,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1261,7 +1415,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1300,7 +1454,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1315,24 +1471,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1349,9 +1490,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1368,56 +1508,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -1433,8 +1543,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1451,16 +1561,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -1473,9 +1587,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1492,6 +1623,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -1499,26 +1635,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -1561,7 +1700,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -1584,7 +1727,7 @@ type Pthread_barrierattr_t = struct {
F__size [4]int8
} /* pthreadtypes.h:118:3 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1603,7 +1746,7 @@ type Pthread_barrierattr_t = struct {
// POSIX Standard: 5.6 File Characteristics <sys/stat.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1621,7 +1764,7 @@ type Pthread_barrierattr_t = struct {
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1645,7 +1788,7 @@ type Pthread_barrierattr_t = struct {
// The Single Unix specification says that some more types are
// available here.
-// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1662,39 +1805,89 @@ type Pthread_barrierattr_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Versions of the `struct stat' data structure.
+// Definition for struct stat.
+// Copyright (C) 2020-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
-// x86-64 versions of the `xmknod' interface.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
type Stat = struct {
- Fst_dev X__dev_t
- Fst_ino X__ino_t
- Fst_nlink X__nlink_t
- Fst_mode X__mode_t
- Fst_uid X__uid_t
- Fst_gid X__gid_t
- F__pad0 int32
- Fst_rdev X__dev_t
- Fst_size X__off_t
- Fst_blksize X__blksize_t
- Fst_blocks X__blkcnt_t
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ F__pad1 uint64
+ Fst_size int64
+ Fst_blksize int32
+ F__pad2 int32
+ Fst_blocks int64
Fst_atim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_mtim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_ctim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
- F__glibc_reserved [3]X__syscall_slong_t
-} /* stat.h:46:1 */
+ F__glibc_reserved [2]int32
+} /* struct_stat.h:44:1 */
// File tree traversal functions declarations.
-// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// Copyright (C) 1994-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1740,7 +1933,7 @@ type Stat = struct {
//
// @(#)fts.h 8.3 (Berkeley) 8/14/94
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1757,7 +1950,7 @@ type Stat = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1789,20 +1982,21 @@ type X_ftsent = struct {
Ffts_pathlen uint16
Ffts_namelen uint16
F__ccgo_pad1 [4]byte
- Ffts_ino Ino_t
- Ffts_dev Dev_t
- Ffts_nlink Nlink_t
+ Ffts_ino uint64
+ Ffts_dev uint64
+ Ffts_nlink uint32
Ffts_level int16
Ffts_info uint16
Ffts_flags uint16
Ffts_instr uint16
+ F__ccgo_pad2 [4]byte
Ffts_statp uintptr
Ffts_name [1]int8
- F__ccgo_pad2 [7]byte
+ F__ccgo_pad3 [7]byte
} /* fts.h:58:2 */
// File tree traversal functions declarations.
-// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// Copyright (C) 1994-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1848,7 +2042,7 @@ type X_ftsent = struct {
//
// @(#)fts.h 8.3 (Berkeley) 8/14/94
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1865,7 +2059,7 @@ type X_ftsent = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1888,7 +2082,7 @@ type FTS = struct {
Ffts_cur uintptr
Ffts_child uintptr
Ffts_array uintptr
- Ffts_dev Dev_t
+ Ffts_dev uint64
Ffts_path uintptr
Ffts_rfd int32
Ffts_pathlen int32
diff --git a/vendor/modernc.org/libc/fts/fts_linux_mips64le.go b/vendor/modernc.org/libc/fts/fts_linux_mips64le.go
new file mode 100644
index 000000000..e12eb02cb
--- /dev/null
+++ b/vendor/modernc.org/libc/fts/fts_linux_mips64le.go
@@ -0,0 +1,1904 @@
+// 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_linux_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:195:1:
+ ALLPERMS = 4095 // stat.h:196:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ DEFFILEMODE = 438 // stat.h:197:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FTS_AGAIN = 1 // fts.h:139:1:
+ FTS_COMFOLLOW = 0x0001 // fts.h:68:1:
+ FTS_D = 1 // fts.h:119:1:
+ FTS_DC = 2 // fts.h:120:1:
+ FTS_DEFAULT = 3 // fts.h:121:1:
+ FTS_DNR = 4 // fts.h:122:1:
+ FTS_DONTCHDIR = 0x01 // fts.h:135:1:
+ FTS_DOT = 5 // fts.h:123:1:
+ FTS_DP = 6 // fts.h:124:1:
+ FTS_ERR = 7 // fts.h:125:1:
+ FTS_F = 8 // fts.h:126:1:
+ FTS_FOLLOW = 2 // fts.h:140:1:
+ FTS_INIT = 9 // fts.h:127:1:
+ FTS_LOGICAL = 0x0002 // fts.h:69:1:
+ FTS_NAMEONLY = 0x0100 // fts.h:78:1:
+ FTS_NOCHDIR = 0x0004 // fts.h:70:1:
+ FTS_NOINSTR = 3 // fts.h:141:1:
+ FTS_NOSTAT = 0x0008 // fts.h:71:1:
+ FTS_NS = 10 // fts.h:128:1:
+ FTS_NSOK = 11 // fts.h:129:1:
+ FTS_OPTIONMASK = 0x00ff // fts.h:76:1:
+ FTS_PHYSICAL = 0x0010 // fts.h:72:1:
+ FTS_ROOTLEVEL = 0 // fts.h:116:1:
+ FTS_ROOTPARENTLEVEL = -1 // fts.h:115:1:
+ FTS_SEEDOT = 0x0020 // fts.h:73:1:
+ FTS_SKIP = 4 // fts.h:142:1:
+ FTS_SL = 12 // fts.h:130:1:
+ FTS_SLNONE = 13 // fts.h:131:1:
+ FTS_STOP = 0x0200 // fts.h:79:1:
+ FTS_SYMFOLLOW = 0x02 // fts.h:136:1:
+ FTS_W = 14 // fts.h:132:1:
+ FTS_WHITEOUT = 0x0080 // fts.h:75:1:
+ FTS_XDEV = 0x0040 // fts.h:74:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ S_BLKSIZE = 512 // stat.h:199:1:
+ S_IEXEC = 64 // stat.h:177:1:
+ S_IFBLK = 24576 // stat.h:107:1:
+ S_IFCHR = 8192 // stat.h:106:1:
+ S_IFDIR = 16384 // stat.h:105:1:
+ S_IFIFO = 4096 // stat.h:110:1:
+ S_IFLNK = 40960 // stat.h:113:1:
+ S_IFMT = 61440 // stat.h:104:1:
+ S_IFREG = 32768 // stat.h:108:1:
+ S_IFSOCK = 49152 // stat.h:117:1:
+ S_IREAD = 256 // stat.h:175:1:
+ S_IRGRP = 32 // stat.h:180:1:
+ S_IROTH = 4 // stat.h:186:1:
+ S_IRUSR = 256 // stat.h:168:1:
+ S_IRWXG = 56 // stat.h:184:1:
+ S_IRWXO = 7 // stat.h:190:1:
+ S_IRWXU = 448 // stat.h:172:1:
+ S_ISGID = 1024 // stat.h:161:1:
+ S_ISUID = 2048 // stat.h:160:1:
+ S_ISVTX = 512 // stat.h:165:1:
+ S_IWGRP = 16 // stat.h:181:1:
+ S_IWOTH = 2 // stat.h:187:1:
+ S_IWRITE = 128 // stat.h:176:1:
+ S_IWUSR = 128 // stat.h:169:1:
+ S_IXGRP = 8 // stat.h:182:1:
+ S_IXOTH = 1 // stat.h:188:1:
+ S_IXUSR = 64 // stat.h:170:1:
+ UTIME_NOW = 1073741823 // stat.h:206:1:
+ UTIME_OMIT = 1073741822 // stat.h:207:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FTS_H = 1 // fts.h:51:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_MKNOD_VER = 0 // stat.h:390:1:
+ X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
+ X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
+ X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
+ X_STAT_VER = 1 // stat.h:44:1:
+ X_STAT_VER_KERNEL = 0 // stat.h:37:1:
+ X_STAT_VER_LINUX = 1 // stat.h:38:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_STAT_H = 1 // stat.h:23:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 5.6 File Characteristics <sys/stat.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// The Single Unix specification says that some more types are
+// available here.
+
+// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Versions of the `struct stat' data structure.
+
+// x86-64 versions of the `xmknod' interface.
+
+type Stat = struct {
+ Fst_dev X__dev_t
+ Fst_ino X__ino_t
+ Fst_nlink X__nlink_t
+ Fst_mode X__mode_t
+ Fst_uid X__uid_t
+ Fst_gid X__gid_t
+ F__pad0 int32
+ Fst_rdev X__dev_t
+ Fst_size X__off_t
+ Fst_blksize X__blksize_t
+ Fst_blocks X__blkcnt_t
+ Fst_atim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_mtim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_ctim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ F__glibc_reserved [3]X__syscall_slong_t
+} /* stat.h:46:1 */
+
+// File tree traversal functions declarations.
+// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+// 4. Neither the name of the University nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE.
+//
+// @(#)fts.h 8.3 (Berkeley) 8/14/94
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+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 uint16
+ Ffts_namelen uint16
+ F__ccgo_pad1 [4]byte
+ Ffts_ino Ino_t
+ Ffts_dev Dev_t
+ Ffts_nlink Nlink_t
+ Ffts_level int16
+ Ffts_info uint16
+ Ffts_flags uint16
+ Ffts_instr uint16
+ Ffts_statp uintptr
+ Ffts_name [1]int8
+ F__ccgo_pad2 [7]byte
+} /* fts.h:58:2 */
+
+// File tree traversal functions declarations.
+// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+// 4. Neither the name of the University nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+// SUCH DAMAGE.
+//
+// @(#)fts.h 8.3 (Berkeley) 8/14/94
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+type FTS = struct {
+ Ffts_cur uintptr
+ Ffts_child uintptr
+ Ffts_array uintptr
+ Ffts_dev Dev_t
+ Ffts_path uintptr
+ Ffts_rfd int32
+ Ffts_pathlen int32
+ Ffts_nitems int32
+ F__ccgo_pad1 [4]byte
+ Ffts_compar uintptr
+ Ffts_options int32
+ F__ccgo_pad2 [4]byte
+} /* fts.h:81:3 */
+
+type FTSENT = X_ftsent /* fts.h:147:3 */
+
+var _ int8 /* gen.c:5:13: */
diff --git a/vendor/modernc.org/libc/grp/capi_illumos_amd64.go b/vendor/modernc.org/libc/grp/capi_illumos_amd64.go
new file mode 100644
index 000000000..66a453286
--- /dev/null
+++ b/vendor/modernc.org/libc/grp/capi_illumos_amd64.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_illumos_amd64.go -pkgname grp', DO NOT EDIT.
+
+package grp
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/grp/capi_linux_loong64.go b/vendor/modernc.org/libc/grp/capi_linux_loong64.go
index 39c1b899e..980986159 100644
--- a/vendor/modernc.org/libc/grp/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/grp/capi_linux_loong64.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 -ignore-unsupported-alignment -o grp/grp_linux_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_linux_loong64.go -pkgname grp', DO NOT EDIT.
package grp
diff --git a/vendor/modernc.org/libc/grp/capi_linux_mips64le.go b/vendor/modernc.org/libc/grp/capi_linux_mips64le.go
new file mode 100644
index 000000000..39c1b899e
--- /dev/null
+++ b/vendor/modernc.org/libc/grp/capi_linux_mips64le.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_linux_amd64.go -pkgname grp', DO NOT EDIT.
+
+package grp
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/grp/grp_illumos_amd64.go b/vendor/modernc.org/libc/grp/grp_illumos_amd64.go
new file mode 100644
index 000000000..54fb89013
--- /dev/null
+++ b/vendor/modernc.org/libc/grp/grp_illumos_amd64.go
@@ -0,0 +1,3181 @@
+// 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_illumos_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 (
+ BUFSIZ = 1024 // stdio_iso.h:124:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ EOF = -1 // stdio_iso.h:152:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FILENAME_MAX = 1024 // stdio_iso.h:156:1:
+ FOPEN_MAX = 20 // stdio_iso.h:155:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ L_ctermid = 9 // stdio.h:207:1:
+ L_cuserid = 9 // stdio.h:211:1:
+ L_tmpnam = 25 // stdio_iso.h:163:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ P_tmpdir = "/var/tmp/" // stdio.h:220:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ SEEK_CUR = 1 // stdio_iso.h:159:1:
+ SEEK_END = 2 // stdio_iso.h:160:1:
+ SEEK_SET = 0 // stdio_iso.h:158:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TMP_MAX = 17576 // stdio_iso.h:161:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILEDEFED = 0 // stdio_iso.h:101:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_GRP_H = 0 // grp.h:36:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IOEOF = 0020 // stdio_iso.h:143:1:
+ X_IOERR = 0040 // stdio_iso.h:144:1:
+ X_IOFBF = 0000 // stdio_iso.h:140:1:
+ X_IOLBF = 0100 // stdio_iso.h:141:1:
+ X_IOMYBUF = 0010 // stdio_iso.h:149:1:
+ X_IONBF = 0004 // stdio_iso.h:142:1:
+ X_IOREAD = 0001 // stdio_iso.h:146:1:
+ X_IORW = 0200 // stdio_iso.h:148:1:
+ X_IOWRT = 0002 // stdio_iso.h:147:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_STDIO_C99_H = 0 // stdio_c99.h:41:1:
+ X_ISO_STDIO_ISO_H = 0 // stdio_iso.h:59:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NFILE = 20 // stdio_iso.h:135:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SBFSIZ = 8 // stdio_iso.h:138:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_STDIO_H = 0 // stdio.h:44:1:
+ X_STDIO_IMPL_H = 0 // stdio_impl.h:28:1:
+ X_STDIO_TAG_H = 0 // stdio_tag.h:28:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_VA_LIST_H = 0 // va_list.h:34:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2020 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2020 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/stdio.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Do all of our 'redefine_extname' processing before
+// declarations of the associated functions are seen.
+// This is necessary to keep gcc happy.
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/iso/stdio_iso.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <stdio.h>.
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The purpose of this header is to provide the type definitions for
+// the va_list argument used by a number of printf and printf like
+// functions. The headers that define these various function prototypes
+// #include this header directly. These include but are not necessarily
+// limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
+// <syslog.h>. The type definitions included in this header are for
+// the benefit of consumers of va_list.
+//
+// Any application that accepts variable argument lists must as documented,
+// include either <varargs.h> or the preferred <stdarg.h>. Doing so will
+// pull in the appropriate compiler protocols defined in <sys/va_impl.h>
+// which is in turn is included by <varargs.h> and <stdarg.h>. See comments
+// in <sys/va_impl.h> for more detailed information regarding implementation
+// and compiler specific protocols.
+
+// The common definitions exported by this header or compilers using
+// this header are:
+//
+// the identifier __builtin_va_alist for the variable list pseudo parameter
+// the type __va_alist_type for the variable list pseudo parameter
+// the type __va_list defining the type of the variable list iterator
+//
+// The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
+// (__GNUC__) and processor macros (e.g. __amd64) are intended to be
+// defined by the compilation system, not the user of the system.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__gnuc_va_list = uintptr /* va_list.h:108:27 */
+// XX64 This seems unnecessary .. but is needed because vcmn_err is
+//
+// defined with __va_list instead of plain old va_list.
+// Perhaps that should be fixed!
+type X__va_list = uintptr /* va_list.h:114:27 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE1 = struct{ F__pad [16]int64 } /* stdio_tag.h:40:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE = X__FILE1 /* stdio_tag.h:40:27 */
+
+// If feature test macros are set that enable interfaces that use types
+// defined in <sys/types.h>, get those types by doing the include.
+//
+// Note that in asking for the interfaces associated with this feature test
+// macro one also asks for definitions of the POSIX types.
+
+type FILE = X__FILE /* stdio_iso.h:102:16 */
+
+type Fpos_t = int64 /* stdio_iso.h:115:15 */
+
+type Fpos64_t = int64 /* stdio.h:188:17 */
+
+type Group = struct {
+ Fgr_name uintptr
+ Fgr_passwd uintptr
+ Fgr_gid uint32
+ 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/grp/grp_linux_loong64.go b/vendor/modernc.org/libc/grp/grp_linux_loong64.go
index 2a52cae7f..2f0c0b39a 100644
--- a/vendor/modernc.org/libc/grp/grp_linux_loong64.go
+++ b/vendor/modernc.org/libc/grp/grp_linux_loong64.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 -ignore-unsupported-alignment -o grp/grp_linux_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_linux_loong64.go -pkgname grp', DO NOT EDIT.
package grp
@@ -15,34 +15,45 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- NSS_BUFLEN_GROUP = 1024 // grp.h:114:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_GRP_H = 1 // grp.h:23:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ NSS_BUFLEN_GROUP = 1024 // grp.h:114:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_GRP_H = 1 // grp.h:23:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -63,7 +74,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -82,7 +93,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 9.2.1 Group Database Access <grp.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -114,6 +125,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -129,12 +142,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -175,6 +191,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -245,6 +263,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -263,9 +337,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -293,7 +373,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -314,23 +395,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -343,6 +425,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -363,8 +447,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -374,6 +458,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -402,8 +489,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -434,11 +526,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -448,11 +543,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -486,6 +597,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -499,13 +626,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -524,7 +668,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -541,11 +685,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -562,7 +720,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -581,14 +739,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -628,8 +786,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -643,14 +801,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -661,10 +817,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -691,7 +849,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -703,60 +861,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215:13 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -769,13 +928,13 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// A null pointer constant.
// For the Single Unix specification we must define this type here.
-type Gid_t = X__gid_t /* grp.h:37:17 */
+type Gid_t = uint32 /* grp.h:37:17 */
// The group structure.
type Group = struct {
Fgr_name uintptr
Fgr_passwd uintptr
- Fgr_gid X__gid_t
+ Fgr_gid uint32
F__ccgo_pad1 [4]byte
Fgr_mem uintptr
} /* grp.h:42:1 */
diff --git a/vendor/modernc.org/libc/grp/grp_linux_mips64le.go b/vendor/modernc.org/libc/grp/grp_linux_mips64le.go
new file mode 100644
index 000000000..2a52cae7f
--- /dev/null
+++ b/vendor/modernc.org/libc/grp/grp_linux_mips64le.go
@@ -0,0 +1,783 @@
+// 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_linux_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 (
+ NSS_BUFLEN_GROUP = 1024 // grp.h:114:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_GRP_H = 1 // grp.h:23:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 9.2.1 Group Database Access <grp.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+type X__sig_atomic_t = int32 /* types.h:214:13 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// For the Single Unix specification we must define this type here.
+type Gid_t = X__gid_t /* grp.h:37:17 */
+
+// The group structure.
+type Group = struct {
+ Fgr_name uintptr
+ Fgr_passwd uintptr
+ Fgr_gid X__gid_t
+ F__ccgo_pad1 [4]byte
+ Fgr_mem uintptr
+} /* grp.h:42:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/ioutil_illumos.go b/vendor/modernc.org/libc/ioutil_illumos.go
new file mode 100644
index 000000000..fa1566427
--- /dev/null
+++ b/vendor/modernc.org/libc/ioutil_illumos.go
@@ -0,0 +1,70 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE-GO file.
+
+// Modifications 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 libc // import "modernc.org/libc"
+
+import (
+ "fmt"
+ "os"
+ "sync"
+ "time"
+ "unsafe"
+ // "golang.org/x/sys/unix"
+ // "modernc.org/libc/errno"
+ // "modernc.org/libc/fcntl"
+)
+
+// Random number state.
+// We generate random temporary file names so that there's a good
+// chance the file doesn't exist yet - keeps the number of tries in
+// TempFile to a minimum.
+var randState uint32
+var randStateMu sync.Mutex
+
+func reseed() uint32 {
+ return uint32(time.Now().UnixNano() + int64(os.Getpid()))
+}
+
+func nextRandom(x uintptr) {
+ randStateMu.Lock()
+ r := randState
+ if r == 0 {
+ r = reseed()
+ }
+ r = r*1664525 + 1013904223 // constants from Numerical Recipes
+ randState = r
+ randStateMu.Unlock()
+ copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
+}
+
+func tempFile(s, x uintptr, flags int32) (fd int, err error) {
+ panic(todo(""))
+ // const maxTry = 10000
+ // nconflict := 0
+ // flags |= int32(os.O_RDWR | os.O_CREATE | os.O_EXCL | unix.O_LARGEFILE)
+ // for i := 0; i < maxTry; i++ {
+ // nextRandom(x)
+ // fdcwd := fcntl.AT_FDCWD
+ // n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), s, uintptr(flags), 0600, 0, 0)
+ // if err == 0 {
+ // return int(n), nil
+ // }
+
+ // if err != errno.EEXIST {
+ // return -1, err
+ // }
+
+ // if nconflict++; nconflict > 10 {
+ // randStateMu.Lock()
+ // randState = reseed()
+ // nconflict = 0
+ // randStateMu.Unlock()
+ // }
+ // }
+ // return -1, unix.Errno(errno.EEXIST)
+}
diff --git a/vendor/modernc.org/libc/langinfo/capi_illumos_amd64.go b/vendor/modernc.org/libc/langinfo/capi_illumos_amd64.go
new file mode 100644
index 000000000..177dc783e
--- /dev/null
+++ b/vendor/modernc.org/libc/langinfo/capi_illumos_amd64.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_illumos_amd64.go -pkgname langinfo', DO NOT EDIT.
+
+package langinfo
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go b/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go
index f9c787ba3..babac02a1 100644
--- a/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/langinfo/capi_linux_loong64.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 -ignore-unsupported-alignment -o langinfo/langinfo_linux_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_linux_loong64.go -pkgname langinfo', DO NOT EDIT.
package langinfo
diff --git a/vendor/modernc.org/libc/langinfo/capi_linux_mips64le.go b/vendor/modernc.org/libc/langinfo/capi_linux_mips64le.go
new file mode 100644
index 000000000..f9c787ba3
--- /dev/null
+++ b/vendor/modernc.org/libc/langinfo/capi_linux_mips64le.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_linux_amd64.go -pkgname langinfo', DO NOT EDIT.
+
+package langinfo
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go
new file mode 100644
index 000000000..ba20b8f2d
--- /dev/null
+++ b/vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go
@@ -0,0 +1,834 @@
+// 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_illumos_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 = 8 // langinfo.h:59:1:
+ ABDAY_2 = 9 // langinfo.h:60:1:
+ ABDAY_3 = 10 // langinfo.h:61:1:
+ ABDAY_4 = 11 // langinfo.h:62:1:
+ ABDAY_5 = 12 // langinfo.h:63:1:
+ ABDAY_6 = 13 // langinfo.h:64:1:
+ ABDAY_7 = 14 // langinfo.h:65:1:
+ ABMON_1 = 27 // langinfo.h:88:1:
+ ABMON_10 = 36 // langinfo.h:97:1:
+ ABMON_11 = 37 // langinfo.h:98:1:
+ ABMON_12 = 38 // langinfo.h:99:1:
+ ABMON_2 = 28 // langinfo.h:89:1:
+ ABMON_3 = 29 // langinfo.h:90:1:
+ ABMON_4 = 30 // langinfo.h:91:1:
+ ABMON_5 = 31 // langinfo.h:92:1:
+ ABMON_6 = 32 // langinfo.h:93:1:
+ ABMON_7 = 33 // langinfo.h:94:1:
+ ABMON_8 = 34 // langinfo.h:95:1:
+ ABMON_9 = 35 // langinfo.h:96:1:
+ ALT_DIGITS = 55 // langinfo.h:135:1:
+ AM_STR = 47 // langinfo.h:122:1:
+ CODESET = 49 // langinfo.h:129:1:
+ CRNCYSTR = 43 // langinfo.h:112:1:
+ DAY_1 = 1 // langinfo.h:47:1:
+ DAY_2 = 2 // langinfo.h:48:1:
+ DAY_3 = 3 // langinfo.h:49:1:
+ DAY_4 = 4 // langinfo.h:50:1:
+ DAY_5 = 5 // langinfo.h:51:1:
+ DAY_6 = 6 // langinfo.h:52:1:
+ DAY_7 = 7 // langinfo.h:53:1:
+ D_FMT = 45 // langinfo.h:120:1:
+ D_T_FMT = 44 // langinfo.h:119:1:
+ ERA = 51 // langinfo.h:131:1:
+ ERA_D_FMT = 52 // langinfo.h:132:1:
+ ERA_D_T_FMT = 53 // langinfo.h:133:1:
+ ERA_T_FMT = 54 // langinfo.h:134:1:
+ MAXSTRMSG = 58 // langinfo.h:141:1:
+ MON_1 = 15 // langinfo.h:71:1:
+ MON_10 = 24 // langinfo.h:80:1:
+ MON_11 = 25 // langinfo.h:81:1:
+ MON_12 = 26 // langinfo.h:82:1:
+ MON_2 = 16 // langinfo.h:72:1:
+ MON_3 = 17 // langinfo.h:73:1:
+ MON_4 = 18 // langinfo.h:74:1:
+ MON_5 = 19 // langinfo.h:75:1:
+ MON_6 = 20 // langinfo.h:76:1:
+ MON_7 = 21 // langinfo.h:77:1:
+ MON_8 = 22 // langinfo.h:78:1:
+ MON_9 = 23 // langinfo.h:79:1:
+ NL_CAT_LOCALE = -1 // nl_types.h:44:1:
+ NL_SETD = 1 // nl_types.h:43:1:
+ NOEXPR = 57 // langinfo.h:137:1:
+ NOSTR = 42 // langinfo.h:110:1:
+ PM_STR = 48 // langinfo.h:123:1:
+ RADIXCHAR = 39 // langinfo.h:105:1:
+ THOUSEP = 40 // langinfo.h:106:1:
+ T_FMT = 46 // langinfo.h:121:1:
+ T_FMT_AMPM = 50 // langinfo.h:130:1:
+ YESEXPR = 56 // langinfo.h:136:1:
+ YESSTR = 41 // langinfo.h:109:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CAT_MAGIC = 0xFF88FF89 // nl_types.h:46:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_DATE_FMT = 58 // langinfo.h:138:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_LANGINFO_H = 0 // langinfo.h:34:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // langinfo.h:151:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_NL_TYPES_H = 0 // nl_types.h:35:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// nl_types.h
+//
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1991,1997,2000 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X_cat_hdr = struct {
+ F__hdr_magic int32
+ F__nsets int32
+ F__mem int32
+ F__msg_hdr_offset int32
+ F__msg_text_offset int32
+} /* nl_types.h:51:1 */
+
+type X_cat_set_hdr = struct {
+ F__set_no int32
+ F__nmsgs int32
+ F__first_msg_hdr int32
+} /* nl_types.h:72:1 */
+
+type X_cat_msg_hdr = struct {
+ F__msg_no int32
+ F__msg_len int32
+ F__msg_offset int32
+} /* nl_types.h:82:1 */
+
+type X_nl_catd_struct = struct {
+ F__content uintptr
+ F__size int32
+ F__trust int32
+} /* nl_types.h:95:1 */
+
+type Nl_catd = uintptr /* nl_types.h:101:32 */
+type Nl_item = int32 /* nl_types.h:102:13 */ // XPG3 Conformant for nl_langinfo().
+
+// The following is just for the compatibility between OSF and Solaris
+// Need to be removed later
+type X__nl_item = int32 /* nl_types.h:106:17 */ // get a string from the database
+
+type Locale_t = uintptr /* langinfo.h:152:24 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go b/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go
index dee83b910..35dd25261 100644
--- a/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go
+++ b/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.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 -ignore-unsupported-alignment -o langinfo/langinfo_linux_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_linux_loong64.go -pkgname langinfo', DO NOT EDIT.
package langinfo
@@ -15,28 +15,39 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- NL_CAT_LOCALE = 1 // nl_types.h:27:1:
- NL_SETD = 1 // nl_types.h:24:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_LOCALE_H = 1 // locale.h:24:1:
- X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
- X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LANGINFO_H = 1 // langinfo.h:20:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_NL_TYPES_H = 1 // nl_types.h:19:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ NL_CAT_LOCALE = 1 // nl_types.h:27:1:
+ NL_SETD = 1 // nl_types.h:24:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_LOCALE_H = 1 // locale.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:20:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LANGINFO_H = 1 // langinfo.h:20:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_NL_TYPES_H = 1 // nl_types.h:19:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Definition of locale category symbol values.
-// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// Copyright (C) 2001-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -533,7 +544,7 @@ type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Access to locale-dependent parameters.
-// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// Copyright (C) 1995-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -551,7 +562,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// <https://www.gnu.org/licenses/>.
// Get the type definition.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -568,7 +579,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -600,6 +611,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -615,12 +628,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -661,6 +677,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -731,6 +749,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -749,9 +823,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -779,7 +859,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -800,23 +881,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -829,6 +911,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -849,8 +933,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -860,6 +944,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -888,8 +975,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -920,11 +1012,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -934,11 +1029,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -972,6 +1083,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -985,6 +1112,23 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
@@ -1002,7 +1146,7 @@ type Nl_item = int32 /* nl_types.h:36:13 */
// POSIX.1-2008 extended locale interface (see locale.h).
// Definition of locale_t.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1020,9 +1164,8 @@ type Nl_item = int32 /* nl_types.h:36:13 */
// <https://www.gnu.org/licenses/>.
// Definition of struct __locale_struct and __locale_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
-// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -1049,10 +1192,10 @@ type X__locale_struct = struct {
F__ctype_tolower uintptr
F__ctype_toupper uintptr
F__names [13]uintptr
-} /* __locale_t.h:28:1 */
+} /* __locale_t.h:27:1 */
-type X__locale_t = uintptr /* __locale_t.h:42:32 */
+type X__locale_t = uintptr /* __locale_t.h:41:32 */
-type Locale_t = X__locale_t /* locale_t.h:24:20 */
+type Locale_t = uintptr /* locale_t.h:24:20 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/langinfo/langinfo_linux_mips64le.go b/vendor/modernc.org/libc/langinfo/langinfo_linux_mips64le.go
new file mode 100644
index 000000000..dee83b910
--- /dev/null
+++ b/vendor/modernc.org/libc/langinfo/langinfo_linux_mips64le.go
@@ -0,0 +1,1058 @@
+// 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_linux_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 (
+ NL_CAT_LOCALE = 1 // nl_types.h:27:1:
+ NL_SETD = 1 // nl_types.h:24:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_LOCALE_H = 1 // locale.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LANGINFO_H = 1 // langinfo.h:20:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_NL_TYPES_H = 1 // nl_types.h:19:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Definition of locale category symbol values.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Construct an `nl_item' value for `nl_langinfo' from a locale category
+// (LC_*) and an item index within the category. Some code may depend on
+// the item values within a category increasing monotonically with the
+// indices.
+
+// Extract the category and item index from a constructed `nl_item' value.
+
+// Enumeration of locale items that can be queried with `nl_langinfo'.
+const ( /* langinfo.h:41:1: */
+ // LC_TIME category: date and time formatting.
+
+ // Abbreviated days of the week.
+ ABDAY_1 = 131072 // Sun
+ ABDAY_2 = 131073
+ ABDAY_3 = 131074
+ ABDAY_4 = 131075
+ ABDAY_5 = 131076
+ ABDAY_6 = 131077
+ ABDAY_7 = 131078
+
+ // Long-named days of the week.
+ DAY_1 = 131079 // Sunday
+ DAY_2 = 131080 // Monday
+ DAY_3 = 131081 // Tuesday
+ DAY_4 = 131082 // Wednesday
+ DAY_5 = 131083 // Thursday
+ DAY_6 = 131084 // Friday
+ DAY_7 = 131085 // Saturday
+
+ // Abbreviated month names, in the grammatical form used when the month
+ // is a part of a complete date.
+ ABMON_1 = 131086 // Jan
+ ABMON_2 = 131087
+ ABMON_3 = 131088
+ ABMON_4 = 131089
+ ABMON_5 = 131090
+ ABMON_6 = 131091
+ ABMON_7 = 131092
+ ABMON_8 = 131093
+ ABMON_9 = 131094
+ ABMON_10 = 131095
+ ABMON_11 = 131096
+ ABMON_12 = 131097
+
+ // Long month names, in the grammatical form used when the month
+ // is a part of a complete date.
+ MON_1 = 131098 // January
+ MON_2 = 131099
+ MON_3 = 131100
+ MON_4 = 131101
+ MON_5 = 131102
+ MON_6 = 131103
+ MON_7 = 131104
+ MON_8 = 131105
+ MON_9 = 131106
+ MON_10 = 131107
+ MON_11 = 131108
+ MON_12 = 131109
+
+ AM_STR = 131110 // Ante meridiem string.
+ PM_STR = 131111 // Post meridiem string.
+
+ D_T_FMT = 131112 // Date and time format for strftime.
+ D_FMT = 131113 // Date format for strftime.
+ T_FMT = 131114 // Time format for strftime.
+ T_FMT_AMPM = 131115 // 12-hour time format for strftime.
+
+ ERA = 131116 // Alternate era.
+ X__ERA_YEAR = 131117 // Year in alternate era format.
+ ERA_D_FMT = 131118 // Date in alternate era format.
+ ALT_DIGITS = 131119 // Alternate symbols for digits.
+ ERA_D_T_FMT = 131120 // Date and time in alternate era format.
+ ERA_T_FMT = 131121 // Time in alternate era format.
+
+ X_NL_TIME_ERA_NUM_ENTRIES = 131122 // Number entries in the era arrays.
+ X_NL_TIME_ERA_ENTRIES = 131123 // Structure with era entries in usable form.
+
+ X_NL_WABDAY_1 = 131124 // Sun
+ X_NL_WABDAY_2 = 131125
+ X_NL_WABDAY_3 = 131126
+ X_NL_WABDAY_4 = 131127
+ X_NL_WABDAY_5 = 131128
+ X_NL_WABDAY_6 = 131129
+ X_NL_WABDAY_7 = 131130
+
+ // Long-named days of the week.
+ X_NL_WDAY_1 = 131131 // Sunday
+ X_NL_WDAY_2 = 131132 // Monday
+ X_NL_WDAY_3 = 131133 // Tuesday
+ X_NL_WDAY_4 = 131134 // Wednesday
+ X_NL_WDAY_5 = 131135 // Thursday
+ X_NL_WDAY_6 = 131136 // Friday
+ X_NL_WDAY_7 = 131137 // Saturday
+
+ // Abbreviated month names, in the grammatical form used when the month
+ // is a part of a complete date.
+ X_NL_WABMON_1 = 131138 // Jan
+ X_NL_WABMON_2 = 131139
+ X_NL_WABMON_3 = 131140
+ X_NL_WABMON_4 = 131141
+ X_NL_WABMON_5 = 131142
+ X_NL_WABMON_6 = 131143
+ X_NL_WABMON_7 = 131144
+ X_NL_WABMON_8 = 131145
+ X_NL_WABMON_9 = 131146
+ X_NL_WABMON_10 = 131147
+ X_NL_WABMON_11 = 131148
+ X_NL_WABMON_12 = 131149
+
+ // Long month names, in the grammatical form used when the month
+ // is a part of a complete date.
+ X_NL_WMON_1 = 131150 // January
+ X_NL_WMON_2 = 131151
+ X_NL_WMON_3 = 131152
+ X_NL_WMON_4 = 131153
+ X_NL_WMON_5 = 131154
+ X_NL_WMON_6 = 131155
+ X_NL_WMON_7 = 131156
+ X_NL_WMON_8 = 131157
+ X_NL_WMON_9 = 131158
+ X_NL_WMON_10 = 131159
+ X_NL_WMON_11 = 131160
+ X_NL_WMON_12 = 131161
+
+ X_NL_WAM_STR = 131162 // Ante meridiem string.
+ X_NL_WPM_STR = 131163 // Post meridiem string.
+
+ X_NL_WD_T_FMT = 131164 // Date and time format for strftime.
+ X_NL_WD_FMT = 131165 // Date format for strftime.
+ X_NL_WT_FMT = 131166 // Time format for strftime.
+ X_NL_WT_FMT_AMPM = 131167 // 12-hour time format for strftime.
+
+ X_NL_WERA_YEAR = 131168 // Year in alternate era format.
+ X_NL_WERA_D_FMT = 131169 // Date in alternate era format.
+ X_NL_WALT_DIGITS = 131170 // Alternate symbols for digits.
+ X_NL_WERA_D_T_FMT = 131171 // Date and time in alternate era format.
+ X_NL_WERA_T_FMT = 131172 // Time in alternate era format.
+
+ X_NL_TIME_WEEK_NDAYS = 131173
+ X_NL_TIME_WEEK_1STDAY = 131174
+ X_NL_TIME_WEEK_1STWEEK = 131175
+ X_NL_TIME_FIRST_WEEKDAY = 131176
+ X_NL_TIME_FIRST_WORKDAY = 131177
+ X_NL_TIME_CAL_DIRECTION = 131178
+ X_NL_TIME_TIMEZONE = 131179
+
+ X_DATE_FMT = 131180 // strftime format for date.
+ X_NL_W_DATE_FMT = 131181
+
+ X_NL_TIME_CODESET = 131182
+
+ // Long month names, in the grammatical form used when the month
+ // is named by itself.
+ X__ALTMON_1 = 131183 // January
+ X__ALTMON_2 = 131184
+ X__ALTMON_3 = 131185
+ X__ALTMON_4 = 131186
+ X__ALTMON_5 = 131187
+ X__ALTMON_6 = 131188
+ X__ALTMON_7 = 131189
+ X__ALTMON_8 = 131190
+ X__ALTMON_9 = 131191
+ X__ALTMON_10 = 131192
+ X__ALTMON_11 = 131193
+ X__ALTMON_12 = 131194
+
+ // Long month names, in the grammatical form used when the month
+ // is named by itself.
+ X_NL_WALTMON_1 = 131195 // January
+ X_NL_WALTMON_2 = 131196
+ X_NL_WALTMON_3 = 131197
+ X_NL_WALTMON_4 = 131198
+ X_NL_WALTMON_5 = 131199
+ X_NL_WALTMON_6 = 131200
+ X_NL_WALTMON_7 = 131201
+ X_NL_WALTMON_8 = 131202
+ X_NL_WALTMON_9 = 131203
+ X_NL_WALTMON_10 = 131204
+ X_NL_WALTMON_11 = 131205
+ X_NL_WALTMON_12 = 131206
+
+ // Abbreviated month names, in the grammatical form used when the month
+ // is named by itself.
+ X_NL_ABALTMON_1 = 131207 // Jan
+ X_NL_ABALTMON_2 = 131208
+ X_NL_ABALTMON_3 = 131209
+ X_NL_ABALTMON_4 = 131210
+ X_NL_ABALTMON_5 = 131211
+ X_NL_ABALTMON_6 = 131212
+ X_NL_ABALTMON_7 = 131213
+ X_NL_ABALTMON_8 = 131214
+ X_NL_ABALTMON_9 = 131215
+ X_NL_ABALTMON_10 = 131216
+ X_NL_ABALTMON_11 = 131217
+ X_NL_ABALTMON_12 = 131218
+
+ // Abbreviated month names, in the grammatical form used when the month
+ // is named by itself.
+ X_NL_WABALTMON_1 = 131219 // Jan
+ X_NL_WABALTMON_2 = 131220
+ X_NL_WABALTMON_3 = 131221
+ X_NL_WABALTMON_4 = 131222
+ X_NL_WABALTMON_5 = 131223
+ X_NL_WABALTMON_6 = 131224
+ X_NL_WABALTMON_7 = 131225
+ X_NL_WABALTMON_8 = 131226
+ X_NL_WABALTMON_9 = 131227
+ X_NL_WABALTMON_10 = 131228
+ X_NL_WABALTMON_11 = 131229
+ X_NL_WABALTMON_12 = 131230
+
+ X_NL_NUM_LC_TIME = 131231 // Number of indices in LC_TIME category.
+
+ // LC_COLLATE category: text sorting.
+ // This information is accessed by the strcoll and strxfrm functions.
+ // These `nl_langinfo' names are used only internally.
+ X_NL_COLLATE_NRULES = 196608
+ X_NL_COLLATE_RULESETS = 196609
+ X_NL_COLLATE_TABLEMB = 196610
+ X_NL_COLLATE_WEIGHTMB = 196611
+ X_NL_COLLATE_EXTRAMB = 196612
+ X_NL_COLLATE_INDIRECTMB = 196613
+ X_NL_COLLATE_GAP1 = 196614
+ X_NL_COLLATE_GAP2 = 196615
+ X_NL_COLLATE_GAP3 = 196616
+ X_NL_COLLATE_TABLEWC = 196617
+ X_NL_COLLATE_WEIGHTWC = 196618
+ X_NL_COLLATE_EXTRAWC = 196619
+ X_NL_COLLATE_INDIRECTWC = 196620
+ X_NL_COLLATE_SYMB_HASH_SIZEMB = 196621
+ X_NL_COLLATE_SYMB_TABLEMB = 196622
+ X_NL_COLLATE_SYMB_EXTRAMB = 196623
+ X_NL_COLLATE_COLLSEQMB = 196624
+ X_NL_COLLATE_COLLSEQWC = 196625
+ X_NL_COLLATE_CODESET = 196626
+ X_NL_NUM_LC_COLLATE = 196627
+
+ // LC_CTYPE category: character classification.
+ // This information is accessed by the functions in <ctype.h>.
+ // These `nl_langinfo' names are used only internally.
+ X_NL_CTYPE_CLASS = 0
+ X_NL_CTYPE_TOUPPER = 1
+ X_NL_CTYPE_GAP1 = 2
+ X_NL_CTYPE_TOLOWER = 3
+ X_NL_CTYPE_GAP2 = 4
+ X_NL_CTYPE_CLASS32 = 5
+ X_NL_CTYPE_GAP3 = 6
+ X_NL_CTYPE_GAP4 = 7
+ X_NL_CTYPE_GAP5 = 8
+ X_NL_CTYPE_GAP6 = 9
+ X_NL_CTYPE_CLASS_NAMES = 10
+ X_NL_CTYPE_MAP_NAMES = 11
+ X_NL_CTYPE_WIDTH = 12
+ X_NL_CTYPE_MB_CUR_MAX = 13
+ X_NL_CTYPE_CODESET_NAME = 14
+ CODESET = 14
+ X_NL_CTYPE_TOUPPER32 = 15
+ X_NL_CTYPE_TOLOWER32 = 16
+ X_NL_CTYPE_CLASS_OFFSET = 17
+ X_NL_CTYPE_MAP_OFFSET = 18
+ X_NL_CTYPE_INDIGITS_MB_LEN = 19
+ X_NL_CTYPE_INDIGITS0_MB = 20
+ X_NL_CTYPE_INDIGITS1_MB = 21
+ X_NL_CTYPE_INDIGITS2_MB = 22
+ X_NL_CTYPE_INDIGITS3_MB = 23
+ X_NL_CTYPE_INDIGITS4_MB = 24
+ X_NL_CTYPE_INDIGITS5_MB = 25
+ X_NL_CTYPE_INDIGITS6_MB = 26
+ X_NL_CTYPE_INDIGITS7_MB = 27
+ X_NL_CTYPE_INDIGITS8_MB = 28
+ X_NL_CTYPE_INDIGITS9_MB = 29
+ X_NL_CTYPE_INDIGITS_WC_LEN = 30
+ X_NL_CTYPE_INDIGITS0_WC = 31
+ X_NL_CTYPE_INDIGITS1_WC = 32
+ X_NL_CTYPE_INDIGITS2_WC = 33
+ X_NL_CTYPE_INDIGITS3_WC = 34
+ X_NL_CTYPE_INDIGITS4_WC = 35
+ X_NL_CTYPE_INDIGITS5_WC = 36
+ X_NL_CTYPE_INDIGITS6_WC = 37
+ X_NL_CTYPE_INDIGITS7_WC = 38
+ X_NL_CTYPE_INDIGITS8_WC = 39
+ X_NL_CTYPE_INDIGITS9_WC = 40
+ X_NL_CTYPE_OUTDIGIT0_MB = 41
+ X_NL_CTYPE_OUTDIGIT1_MB = 42
+ X_NL_CTYPE_OUTDIGIT2_MB = 43
+ X_NL_CTYPE_OUTDIGIT3_MB = 44
+ X_NL_CTYPE_OUTDIGIT4_MB = 45
+ X_NL_CTYPE_OUTDIGIT5_MB = 46
+ X_NL_CTYPE_OUTDIGIT6_MB = 47
+ X_NL_CTYPE_OUTDIGIT7_MB = 48
+ X_NL_CTYPE_OUTDIGIT8_MB = 49
+ X_NL_CTYPE_OUTDIGIT9_MB = 50
+ X_NL_CTYPE_OUTDIGIT0_WC = 51
+ X_NL_CTYPE_OUTDIGIT1_WC = 52
+ X_NL_CTYPE_OUTDIGIT2_WC = 53
+ X_NL_CTYPE_OUTDIGIT3_WC = 54
+ X_NL_CTYPE_OUTDIGIT4_WC = 55
+ X_NL_CTYPE_OUTDIGIT5_WC = 56
+ X_NL_CTYPE_OUTDIGIT6_WC = 57
+ X_NL_CTYPE_OUTDIGIT7_WC = 58
+ X_NL_CTYPE_OUTDIGIT8_WC = 59
+ X_NL_CTYPE_OUTDIGIT9_WC = 60
+ X_NL_CTYPE_TRANSLIT_TAB_SIZE = 61
+ X_NL_CTYPE_TRANSLIT_FROM_IDX = 62
+ X_NL_CTYPE_TRANSLIT_FROM_TBL = 63
+ X_NL_CTYPE_TRANSLIT_TO_IDX = 64
+ X_NL_CTYPE_TRANSLIT_TO_TBL = 65
+ X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN = 66
+ X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING = 67
+ X_NL_CTYPE_TRANSLIT_IGNORE_LEN = 68
+ X_NL_CTYPE_TRANSLIT_IGNORE = 69
+ X_NL_CTYPE_MAP_TO_NONASCII = 70
+ X_NL_CTYPE_NONASCII_CASE = 71
+ X_NL_CTYPE_EXTRA_MAP_1 = 72
+ X_NL_CTYPE_EXTRA_MAP_2 = 73
+ X_NL_CTYPE_EXTRA_MAP_3 = 74
+ X_NL_CTYPE_EXTRA_MAP_4 = 75
+ X_NL_CTYPE_EXTRA_MAP_5 = 76
+ X_NL_CTYPE_EXTRA_MAP_6 = 77
+ X_NL_CTYPE_EXTRA_MAP_7 = 78
+ X_NL_CTYPE_EXTRA_MAP_8 = 79
+ X_NL_CTYPE_EXTRA_MAP_9 = 80
+ X_NL_CTYPE_EXTRA_MAP_10 = 81
+ X_NL_CTYPE_EXTRA_MAP_11 = 82
+ X_NL_CTYPE_EXTRA_MAP_12 = 83
+ X_NL_CTYPE_EXTRA_MAP_13 = 84
+ X_NL_CTYPE_EXTRA_MAP_14 = 85
+ X_NL_NUM_LC_CTYPE = 86
+
+ // LC_MONETARY category: formatting of monetary quantities.
+ // These items each correspond to a member of `struct lconv',
+ // defined in <locale.h>.
+ X__INT_CURR_SYMBOL = 262144
+ X__CURRENCY_SYMBOL = 262145
+ X__MON_DECIMAL_POINT = 262146
+ X__MON_THOUSANDS_SEP = 262147
+ X__MON_GROUPING = 262148
+ X__POSITIVE_SIGN = 262149
+ X__NEGATIVE_SIGN = 262150
+ X__INT_FRAC_DIGITS = 262151
+ X__FRAC_DIGITS = 262152
+ X__P_CS_PRECEDES = 262153
+ X__P_SEP_BY_SPACE = 262154
+ X__N_CS_PRECEDES = 262155
+ X__N_SEP_BY_SPACE = 262156
+ X__P_SIGN_POSN = 262157
+ X__N_SIGN_POSN = 262158
+ X_NL_MONETARY_CRNCYSTR = 262159
+ X__INT_P_CS_PRECEDES = 262160
+ X__INT_P_SEP_BY_SPACE = 262161
+ X__INT_N_CS_PRECEDES = 262162
+ X__INT_N_SEP_BY_SPACE = 262163
+ X__INT_P_SIGN_POSN = 262164
+ X__INT_N_SIGN_POSN = 262165
+ X_NL_MONETARY_DUO_INT_CURR_SYMBOL = 262166
+ X_NL_MONETARY_DUO_CURRENCY_SYMBOL = 262167
+ X_NL_MONETARY_DUO_INT_FRAC_DIGITS = 262168
+ X_NL_MONETARY_DUO_FRAC_DIGITS = 262169
+ X_NL_MONETARY_DUO_P_CS_PRECEDES = 262170
+ X_NL_MONETARY_DUO_P_SEP_BY_SPACE = 262171
+ X_NL_MONETARY_DUO_N_CS_PRECEDES = 262172
+ X_NL_MONETARY_DUO_N_SEP_BY_SPACE = 262173
+ X_NL_MONETARY_DUO_INT_P_CS_PRECEDES = 262174
+ X_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE = 262175
+ X_NL_MONETARY_DUO_INT_N_CS_PRECEDES = 262176
+ X_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE = 262177
+ X_NL_MONETARY_DUO_P_SIGN_POSN = 262178
+ X_NL_MONETARY_DUO_N_SIGN_POSN = 262179
+ X_NL_MONETARY_DUO_INT_P_SIGN_POSN = 262180
+ X_NL_MONETARY_DUO_INT_N_SIGN_POSN = 262181
+ X_NL_MONETARY_UNO_VALID_FROM = 262182
+ X_NL_MONETARY_UNO_VALID_TO = 262183
+ X_NL_MONETARY_DUO_VALID_FROM = 262184
+ X_NL_MONETARY_DUO_VALID_TO = 262185
+ X_NL_MONETARY_CONVERSION_RATE = 262186
+ X_NL_MONETARY_DECIMAL_POINT_WC = 262187
+ X_NL_MONETARY_THOUSANDS_SEP_WC = 262188
+ X_NL_MONETARY_CODESET = 262189
+ X_NL_NUM_LC_MONETARY = 262190
+
+ // LC_NUMERIC category: formatting of numbers.
+ // These also correspond to members of `struct lconv'; see <locale.h>.
+ X__DECIMAL_POINT = 65536
+ RADIXCHAR = 65536
+ X__THOUSANDS_SEP = 65537
+ THOUSEP = 65537
+ X__GROUPING = 65538
+ X_NL_NUMERIC_DECIMAL_POINT_WC = 65539
+ X_NL_NUMERIC_THOUSANDS_SEP_WC = 65540
+ X_NL_NUMERIC_CODESET = 65541
+ X_NL_NUM_LC_NUMERIC = 65542
+
+ X__YESEXPR = 327680 // Regex matching ``yes'' input.
+ X__NOEXPR = 327681 // Regex matching ``no'' input.
+ X__YESSTR = 327682 // Output string for ``yes''.
+ X__NOSTR = 327683 // Output string for ``no''.
+ X_NL_MESSAGES_CODESET = 327684
+ X_NL_NUM_LC_MESSAGES = 327685
+
+ X_NL_PAPER_HEIGHT = 458752
+ X_NL_PAPER_WIDTH = 458753
+ X_NL_PAPER_CODESET = 458754
+ X_NL_NUM_LC_PAPER = 458755
+
+ X_NL_NAME_NAME_FMT = 524288
+ X_NL_NAME_NAME_GEN = 524289
+ X_NL_NAME_NAME_MR = 524290
+ X_NL_NAME_NAME_MRS = 524291
+ X_NL_NAME_NAME_MISS = 524292
+ X_NL_NAME_NAME_MS = 524293
+ X_NL_NAME_CODESET = 524294
+ X_NL_NUM_LC_NAME = 524295
+
+ X_NL_ADDRESS_POSTAL_FMT = 589824
+ X_NL_ADDRESS_COUNTRY_NAME = 589825
+ X_NL_ADDRESS_COUNTRY_POST = 589826
+ X_NL_ADDRESS_COUNTRY_AB2 = 589827
+ X_NL_ADDRESS_COUNTRY_AB3 = 589828
+ X_NL_ADDRESS_COUNTRY_CAR = 589829
+ X_NL_ADDRESS_COUNTRY_NUM = 589830
+ X_NL_ADDRESS_COUNTRY_ISBN = 589831
+ X_NL_ADDRESS_LANG_NAME = 589832
+ X_NL_ADDRESS_LANG_AB = 589833
+ X_NL_ADDRESS_LANG_TERM = 589834
+ X_NL_ADDRESS_LANG_LIB = 589835
+ X_NL_ADDRESS_CODESET = 589836
+ X_NL_NUM_LC_ADDRESS = 589837
+
+ X_NL_TELEPHONE_TEL_INT_FMT = 655360
+ X_NL_TELEPHONE_TEL_DOM_FMT = 655361
+ X_NL_TELEPHONE_INT_SELECT = 655362
+ X_NL_TELEPHONE_INT_PREFIX = 655363
+ X_NL_TELEPHONE_CODESET = 655364
+ X_NL_NUM_LC_TELEPHONE = 655365
+
+ X_NL_MEASUREMENT_MEASUREMENT = 720896
+ X_NL_MEASUREMENT_CODESET = 720897
+ X_NL_NUM_LC_MEASUREMENT = 720898
+
+ X_NL_IDENTIFICATION_TITLE = 786432
+ X_NL_IDENTIFICATION_SOURCE = 786433
+ X_NL_IDENTIFICATION_ADDRESS = 786434
+ X_NL_IDENTIFICATION_CONTACT = 786435
+ X_NL_IDENTIFICATION_EMAIL = 786436
+ X_NL_IDENTIFICATION_TEL = 786437
+ X_NL_IDENTIFICATION_FAX = 786438
+ X_NL_IDENTIFICATION_LANGUAGE = 786439
+ X_NL_IDENTIFICATION_TERRITORY = 786440
+ X_NL_IDENTIFICATION_AUDIENCE = 786441
+ X_NL_IDENTIFICATION_APPLICATION = 786442
+ X_NL_IDENTIFICATION_ABBREVIATION = 786443
+ X_NL_IDENTIFICATION_REVISION = 786444
+ X_NL_IDENTIFICATION_DATE = 786445
+ X_NL_IDENTIFICATION_CATEGORY = 786446
+ X_NL_IDENTIFICATION_CODESET = 786447
+ X_NL_NUM_LC_IDENTIFICATION = 786448
+
+ // This marks the highest value used.
+ X_NL_NUM = 786449
+)
+
+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 */
+
+// Access to locale-dependent parameters.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get the type definition.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// The default message set used by the gencat program.
+
+// Value for FLAG parameter of `catgets' to say we want XPG4 compliance.
+
+// Message catalog descriptor type.
+type Nl_catd = uintptr /* nl_types.h:33:14 */
+
+// Type used by `nl_langinfo'.
+type Nl_item = int32 /* nl_types.h:36:13 */
+
+// POSIX.1-2008 extended locale interface (see locale.h).
+// Definition of locale_t.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of struct __locale_struct and __locale_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX.1-2008: the locale_t type, representing a locale context
+// (implementation-namespace version). This type should be treated
+// as opaque by applications; some details are exposed for the sake of
+// efficiency in e.g. ctype functions.
+
+type X__locale_struct = struct {
+ F__locales [13]uintptr
+ F__ctype_b uintptr
+ F__ctype_tolower uintptr
+ F__ctype_toupper uintptr
+ F__names [13]uintptr
+} /* __locale_t.h:28:1 */
+
+type X__locale_t = uintptr /* __locale_t.h:42:32 */
+
+type Locale_t = X__locale_t /* locale_t.h:24:20 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/libc.go b/vendor/modernc.org/libc/libc.go
index e932e0819..46288a8f4 100644
--- a/vendor/modernc.org/libc/libc.go
+++ b/vendor/modernc.org/libc/libc.go
@@ -53,6 +53,8 @@ var (
allocMu sync.Mutex
environInitialized bool
isWindows bool
+ ungetcMu sync.Mutex
+ ungetc = map[uintptr]byte{}
)
// Keep these outside of the var block otherwise go generate will miss them.
@@ -80,11 +82,17 @@ func EnvironP() uintptr {
}
func X___errno_location(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return X__errno_location(t)
}
// int * __errno_location(void);
func X__errno_location(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
@@ -130,7 +138,12 @@ func Start(main func(*TLS, int32, uintptr) int32) {
exit(t, rc, audit)
}
-func Xexit(t *TLS, status int32) { exit(t, status, false) }
+func Xexit(t *TLS, status int32) {
+ if __ccgo_strace {
+ trc("t=%v status=%v, (%v:)", t, status, origin(2))
+ }
+ exit(t, status, false)
+}
func exit(t *TLS, status int32, audit bool) {
if len(Covered) != 0 {
@@ -190,16 +203,25 @@ func SetEnviron(t *TLS, env []string) {
// void setbuf(FILE *stream, char *buf);
func Xsetbuf(t *TLS, stream, buf uintptr) {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
//TODO panic(todo(""))
}
// size_t confstr(int name, char *buf, size_t len);
func Xconfstr(t *TLS, name int32, buf uintptr, len types.Size_t) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v name=%v buf=%v len=%v, (%v:)", t, name, buf, len, origin(2))
+ }
panic(todo(""))
}
// int puts(const char *s);
func Xputs(t *TLS, s uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
n, err := fmt.Printf("%s\n", GoString(s))
if err != nil {
return stdio.EOF
@@ -215,6 +237,9 @@ var (
// long int random(void);
func Xrandom(t *TLS) long {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
randomMu.Lock()
r := randomGen.Int63n(math.MaxInt32 + 1)
randomMu.Unlock()
@@ -232,73 +257,310 @@ func write(b []byte) (int, error) {
return len(b), nil
}
-func X__builtin_bzero(t *TLS, s uintptr, n types.Size_t) { Xbzero(t, s, n) }
-func X__builtin_abort(t *TLS) { Xabort(t) }
-func X__builtin_abs(t *TLS, j int32) int32 { return Xabs(t, j) }
-func X__builtin_clz(t *TLS, n uint32) int32 { return int32(mbits.LeadingZeros32(n)) }
-func X__builtin_clzl(t *TLS, n ulong) int32 { return int32(mbits.LeadingZeros64(uint64(n))) }
-func X__builtin_clzll(t *TLS, n uint64) int32 { return int32(mbits.LeadingZeros64(n)) }
-func X__builtin_constant_p_impl() { panic(todo("internal error: should never be called")) }
-func X__builtin_copysign(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) }
-func X__builtin_copysignf(t *TLS, x, y float32) float32 { return Xcopysignf(t, x, y) }
-func X__builtin_copysignl(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) }
-func X__builtin_exit(t *TLS, status int32) { Xexit(t, status) }
-func X__builtin_expect(t *TLS, exp, c long) long { return exp }
-func X__builtin_fabs(t *TLS, x float64) float64 { return Xfabs(t, x) }
-func X__builtin_fabsf(t *TLS, x float32) float32 { return Xfabsf(t, x) }
-func X__builtin_fabsl(t *TLS, x float64) float64 { return Xfabsl(t, x) }
-func X__builtin_free(t *TLS, ptr uintptr) { Xfree(t, ptr) }
-func X__builtin_getentropy(t *TLS, buf uintptr, n types.Size_t) int32 { return Xgetentropy(t, buf, n) }
-func X__builtin_huge_val(t *TLS) float64 { return math.Inf(1) }
-func X__builtin_huge_valf(t *TLS) float32 { return float32(math.Inf(1)) }
-func X__builtin_inf(t *TLS) float64 { return math.Inf(1) }
-func X__builtin_inff(t *TLS) float32 { return float32(math.Inf(1)) }
-func X__builtin_infl(t *TLS) float64 { return math.Inf(1) }
-func X__builtin_malloc(t *TLS, size types.Size_t) uintptr { return Xmalloc(t, size) }
-func X__builtin_memcmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 { return Xmemcmp(t, s1, s2, n) }
-func X__builtin_nan(t *TLS, s uintptr) float64 { return math.NaN() }
-func X__builtin_nanf(t *TLS, s uintptr) float32 { return float32(math.NaN()) }
-func X__builtin_nanl(t *TLS, s uintptr) float64 { return math.NaN() }
-func X__builtin_prefetch(t *TLS, addr, args uintptr) {}
-func X__builtin_printf(t *TLS, s, args uintptr) int32 { return Xprintf(t, s, args) }
-func X__builtin_strchr(t *TLS, s uintptr, c int32) uintptr { return Xstrchr(t, s, c) }
-func X__builtin_strcmp(t *TLS, s1, s2 uintptr) int32 { return Xstrcmp(t, s1, s2) }
-func X__builtin_strcpy(t *TLS, dest, src uintptr) uintptr { return Xstrcpy(t, dest, src) }
-func X__builtin_strlen(t *TLS, s uintptr) types.Size_t { return Xstrlen(t, s) }
-func X__builtin_trap(t *TLS) { Xabort(t) }
-func X__isnan(t *TLS, arg float64) int32 { return X__builtin_isnan(t, arg) }
-func X__isnanf(t *TLS, arg float32) int32 { return Xisnanf(t, arg) }
-func X__isnanl(t *TLS, arg float64) int32 { return Xisnanl(t, arg) }
-
-func Xvfprintf(t *TLS, stream, format, ap uintptr) int32 { return Xfprintf(t, stream, format, ap) }
+func X__builtin_bzero(t *TLS, s uintptr, n types.Size_t) {
+ if __ccgo_strace {
+ trc("t=%v s=%v n=%v, (%v:)", t, s, n, origin(2))
+ }
+ Xbzero(t, s, n)
+}
+
+func X__builtin_abort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ Xabort(t)
+}
+
+func X__builtin_abs(t *TLS, j int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v j=%v, (%v:)", t, j, origin(2))
+ }
+ return Xabs(t, j)
+}
+
+func X__builtin_clz(t *TLS, n uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v, (%v:)", t, n, origin(2))
+ }
+ return int32(mbits.LeadingZeros32(n))
+}
+
+func X__builtin_clzl(t *TLS, n ulong) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v, (%v:)", t, n, origin(2))
+ }
+ return int32(mbits.LeadingZeros64(uint64(n)))
+}
+
+func X__builtin_clzll(t *TLS, n uint64) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v, (%v:)", t, n, origin(2))
+ }
+ return int32(mbits.LeadingZeros64(n))
+}
+func X__builtin_constant_p_impl() { panic(todo("internal error: should never be called")) }
+
+func X__builtin_copysign(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return Xcopysign(t, x, y)
+}
+
+func X__builtin_copysignf(t *TLS, x, y float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return Xcopysignf(t, x, y)
+}
+
+func X__builtin_copysignl(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return Xcopysign(t, x, y)
+}
+
+func X__builtin_exit(t *TLS, status int32) {
+ if __ccgo_strace {
+ trc("t=%v status=%v, (%v:)", t, status, origin(2))
+ }
+ Xexit(t, status)
+}
+
+func X__builtin_expect(t *TLS, exp, c long) long {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
+ return exp
+}
+
+func X__builtin_fabs(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xfabs(t, x)
+}
+
+func X__builtin_fabsf(t *TLS, x float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xfabsf(t, x)
+}
+
+func X__builtin_fabsl(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xfabsl(t, x)
+}
+
+func X__builtin_free(t *TLS, ptr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v, (%v:)", t, ptr, origin(2))
+ }
+ Xfree(t, ptr)
+}
+
+func X__builtin_getentropy(t *TLS, buf uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v n=%v, (%v:)", t, buf, n, origin(2))
+ }
+ return Xgetentropy(t, buf, n)
+}
+
+func X__builtin_huge_val(t *TLS) float64 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return math.Inf(1)
+}
+
+func X__builtin_huge_valf(t *TLS) float32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return float32(math.Inf(1))
+}
+
+func X__builtin_inf(t *TLS) float64 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return math.Inf(1)
+}
+
+func X__builtin_inff(t *TLS) float32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return float32(math.Inf(1))
+}
+
+func X__builtin_infl(t *TLS) float64 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return math.Inf(1)
+}
+
+func X__builtin_malloc(t *TLS, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v size=%v, (%v:)", t, size, origin(2))
+ }
+ return Xmalloc(t, size)
+}
+
+func X__builtin_memcmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v n=%v, (%v:)", t, s2, n, origin(2))
+ }
+ return Xmemcmp(t, s1, s2, n)
+}
+
+func X__builtin_nan(t *TLS, s uintptr) float64 {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
+ return math.NaN()
+}
+
+func X__builtin_nanf(t *TLS, s uintptr) float32 {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
+ return float32(math.NaN())
+}
+
+func X__builtin_nanl(t *TLS, s uintptr) float64 {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
+ return math.NaN()
+}
+
+func X__builtin_prefetch(t *TLS, addr, args uintptr) {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
+}
+
+func X__builtin_printf(t *TLS, s, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
+ return Xprintf(t, s, args)
+}
+
+func X__builtin_strchr(t *TLS, s uintptr, c int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v, (%v:)", t, s, c, origin(2))
+ }
+ return Xstrchr(t, s, c)
+}
+
+func X__builtin_strcmp(t *TLS, s1, s2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v, (%v:)", t, s2, origin(2))
+ }
+ return Xstrcmp(t, s1, s2)
+}
+
+func X__builtin_strcpy(t *TLS, dest, src uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ }
+ return Xstrcpy(t, dest, src)
+}
+
+func X__builtin_strlen(t *TLS, s uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
+ return Xstrlen(t, s)
+}
+
+func X__builtin_trap(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ Xabort(t)
+}
+
+func X__isnan(t *TLS, arg float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v arg=%v, (%v:)", t, arg, origin(2))
+ }
+ return X__builtin_isnan(t, arg)
+}
+
+func X__isnanf(t *TLS, arg float32) int32 {
+ if __ccgo_strace {
+ trc("t=%v arg=%v, (%v:)", t, arg, origin(2))
+ }
+ return Xisnanf(t, arg)
+}
+
+func X__isnanl(t *TLS, arg float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v arg=%v, (%v:)", t, arg, origin(2))
+ }
+ return Xisnanl(t, arg)
+}
+
+func Xvfprintf(t *TLS, stream, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
+ return Xfprintf(t, stream, format, ap)
+}
// int __builtin_popcount (unsigned int x)
func X__builtin_popcount(t *TLS, x uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return int32(mbits.OnesCount32(x))
}
// int __builtin_popcountl (unsigned long x)
func X__builtin_popcountl(t *TLS, x ulong) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return int32(mbits.OnesCount64(uint64(x)))
}
// char * __builtin___strcpy_chk (char *dest, const char *src, size_t os);
func X__builtin___strcpy_chk(t *TLS, dest, src uintptr, os types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2))
+ }
return Xstrcpy(t, dest, src)
}
func X__builtin_mmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap(t, addr, length, prot, flags, fd, offset)
}
// uint16_t __builtin_bswap16 (uint32_t x)
func X__builtin_bswap16(t *TLS, x uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return x<<8 |
x>>8
}
// uint32_t __builtin_bswap32 (uint32_t x)
func X__builtin_bswap32(t *TLS, x uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return x<<24 |
x&0xff00<<8 |
x&0xff0000>>8 |
@@ -307,6 +569,9 @@ func X__builtin_bswap32(t *TLS, x uint32) uint32 {
// uint64_t __builtin_bswap64 (uint64_t x)
func X__builtin_bswap64(t *TLS, x uint64) uint64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return x<<56 |
x&0xff00<<40 |
x&0xff0000<<24 |
@@ -319,6 +584,9 @@ func X__builtin_bswap64(t *TLS, x uint64) uint64 {
// bool __builtin_add_overflow (type1 a, type2 b, type3 *res)
func X__builtin_add_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r, ovf := mathutil.AddOverflowInt64(a, b)
*(*int64)(unsafe.Pointer(res)) = r
return Bool32(ovf)
@@ -326,6 +594,9 @@ func X__builtin_add_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
// bool __builtin_add_overflow (type1 a, type2 b, type3 *res)
func X__builtin_add_overflowUint32(t *TLS, a, b uint32, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r := a + b
*(*uint32)(unsafe.Pointer(res)) = r
return Bool32(r < a)
@@ -333,6 +604,9 @@ func X__builtin_add_overflowUint32(t *TLS, a, b uint32, res uintptr) int32 {
// bool __builtin_add_overflow (type1 a, type2 b, type3 *res)
func X__builtin_add_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r := a + b
*(*uint64)(unsafe.Pointer(res)) = r
return Bool32(r < a)
@@ -340,6 +614,9 @@ func X__builtin_add_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 {
// bool __builtin_sub_overflow (type1 a, type2 b, type3 *res)
func X__builtin_sub_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r, ovf := mathutil.SubOverflowInt64(a, b)
*(*int64)(unsafe.Pointer(res)) = r
return Bool32(ovf)
@@ -347,6 +624,9 @@ func X__builtin_sub_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
// bool __builtin_mul_overflow (type1 a, type2 b, type3 *res)
func X__builtin_mul_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r, ovf := mathutil.MulOverflowInt64(a, b)
*(*int64)(unsafe.Pointer(res)) = r
return Bool32(ovf)
@@ -354,6 +634,9 @@ func X__builtin_mul_overflowInt64(t *TLS, a, b int64, res uintptr) int32 {
// bool __builtin_mul_overflow (type1 a, type2 b, type3 *res)
func X__builtin_mul_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
hi, lo := mbits.Mul64(a, b)
*(*uint64)(unsafe.Pointer(res)) = lo
return Bool32(hi != 0)
@@ -361,31 +644,52 @@ func X__builtin_mul_overflowUint64(t *TLS, a, b uint64, res uintptr) int32 {
// bool __builtin_mul_overflow (type1 a, type2 b, type3 *res)
func X__builtin_mul_overflowUint128(t *TLS, a, b Uint128, res uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v res=%v, (%v:)", t, b, res, origin(2))
+ }
r, ovf := a.mulOvf(b)
*(*Uint128)(unsafe.Pointer(res)) = r
return Bool32(ovf)
}
func X__builtin_unreachable(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
fmt.Fprintf(os.Stderr, "unrechable\n")
os.Stderr.Sync()
Xexit(t, 1)
}
func X__builtin_snprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v args=%v, (%v:)", t, str, size, args, origin(2))
+ }
return Xsnprintf(t, str, size, format, args)
}
func X__builtin_sprintf(t *TLS, str, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return Xsprintf(t, str, format, args)
}
func X__builtin_memcpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return Xmemcpy(t, dest, src, n)
}
// void * __builtin___memcpy_chk (void *dest, const void *src, size_t n, size_t os);
func X__builtin___memcpy_chk(t *TLS, dest, src uintptr, n, os types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if os != ^types.Size_t(0) && n < os {
Xabort(t)
}
@@ -394,11 +698,17 @@ func X__builtin___memcpy_chk(t *TLS, dest, src uintptr, n, os types.Size_t) (r u
}
func X__builtin_memset(t *TLS, s uintptr, c int32, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v n=%v, (%v:)", t, s, c, n, origin(2))
+ }
return Xmemset(t, s, c, n)
}
// void * __builtin___memset_chk (void *s, int c, size_t n, size_t os);
func X__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v os=%v, (%v:)", t, s, c, os, origin(2))
+ }
if os < n {
Xabort(t)
}
@@ -408,19 +718,28 @@ func X__builtin___memset_chk(t *TLS, s uintptr, c int32, n, os types.Size_t) uin
// size_t __builtin_object_size (const void * ptr, int type)
func X__builtin_object_size(t *TLS, p uintptr, typ int32) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v p=%v typ=%v, (%v:)", t, p, typ, origin(2))
+ }
return ^types.Size_t(0) //TODO frontend magic
}
var atomicLoadStore16 sync.Mutex
+func AtomicStoreNUint8(ptr uintptr, val uint8, memorder int32) {
+ a_store_8(ptr, val)
+}
+
func AtomicStoreNUint16(ptr uintptr, val uint16, memorder int32) {
- atomicLoadStore16.Lock()
- *(*uint16)(unsafe.Pointer(ptr)) = val
- atomicLoadStore16.Unlock()
+ a_store_16(ptr, val)
}
// int sprintf(char *str, const char *format, ...);
func Xsprintf(t *TLS, str, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
b := printf(format, args)
r = int32(len(b))
copy((*RawMem)(unsafe.Pointer(str))[:r:r], b)
@@ -430,11 +749,18 @@ func Xsprintf(t *TLS, str, format, args uintptr) (r int32) {
// int __builtin___sprintf_chk (char *s, int flag, size_t os, const char *fmt, ...);
func X__builtin___sprintf_chk(t *TLS, s uintptr, flag int32, os types.Size_t, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v s=%v flag=%v os=%v args=%v, (%v:)", t, s, flag, os, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return Xsprintf(t, s, format, args)
}
// void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
func Xqsort(t *TLS, base uintptr, nmemb, size types.Size_t, compar uintptr) {
+ if __ccgo_strace {
+ trc("t=%v base=%v size=%v compar=%v, (%v:)", t, base, size, compar, origin(2))
+ }
sort.Sort(&sorter{
len: int(nmemb),
base: base,
@@ -448,6 +774,9 @@ func Xqsort(t *TLS, base uintptr, nmemb, size types.Size_t, compar uintptr) {
// void __assert_fail(const char * assertion, const char * file, unsigned int line, const char * function);
func X__assert_fail(t *TLS, assertion, file uintptr, line uint32, function uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v function=%v, (%v:)", t, file, line, function, origin(2))
+ }
fmt.Fprintf(os.Stderr, "assertion failure: %s:%d.%s: %s\n", GoString(file), line, GoString(function), GoString(assertion))
if memgrind {
fmt.Fprintf(os.Stderr, "%s\n", debug.Stack())
@@ -457,50 +786,84 @@ func X__assert_fail(t *TLS, assertion, file uintptr, line uint32, function uintp
}
// int vprintf(const char *format, va_list ap);
-func Xvprintf(t *TLS, s, ap uintptr) int32 { return Xprintf(t, s, ap) }
+
+func Xvprintf(t *TLS, s, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
+ return Xprintf(t, s, ap)
+}
// int vsprintf(char *str, const char *format, va_list ap);
func Xvsprintf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
return Xsprintf(t, str, format, va)
}
// int vsnprintf(char *str, size_t size, const char *format, va_list ap);
func Xvsnprintf(t *TLS, str uintptr, size types.Size_t, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v va=%v, (%v:)", t, str, size, va, origin(2))
+ }
return Xsnprintf(t, str, size, format, va)
}
func X__builtin_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v va=%v, (%v:)", t, str, size, va, origin(2))
+ }
return Xvsnprintf(t, str, size, format, va)
}
// int obstack_vprintf (struct obstack *obstack, const char *template, va_list ap)
func Xobstack_vprintf(t *TLS, obstack, template, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
panic(todo(""))
}
// extern void _obstack_newchunk(struct obstack *, int);
func X_obstack_newchunk(t *TLS, obstack uintptr, length int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v obstack=%v length=%v, (%v:)", t, obstack, length, origin(2))
+ }
panic(todo(""))
}
// int _obstack_begin (struct obstack *h, _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment, void *(*chunkfun) (size_t), void (*freefun) (void *))
func X_obstack_begin(t *TLS, obstack uintptr, size, alignment int32, chunkfun, freefun uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v obstack=%v alignment=%v freefun=%v, (%v:)", t, obstack, alignment, freefun, origin(2))
+ }
panic(todo(""))
}
// void obstack_free (struct obstack *h, void *obj)
func Xobstack_free(t *TLS, obstack, obj uintptr) {
+ if __ccgo_strace {
+ trc("t=%v obj=%v, (%v:)", t, obj, origin(2))
+ }
panic(todo(""))
}
// unsigned int sleep(unsigned int seconds);
func Xsleep(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
gotime.Sleep(gotime.Second * gotime.Duration(seconds))
return 0
}
// size_t strcspn(const char *s, const char *reject);
func Xstrcspn(t *TLS, s, reject uintptr) (r types.Size_t) {
+ if __ccgo_strace {
+ trc("t=%v reject=%v, (%v:)", t, reject, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
bits := newBits(256)
for {
c := *(*byte)(unsafe.Pointer(reject))
@@ -524,12 +887,19 @@ func Xstrcspn(t *TLS, s, reject uintptr) (r types.Size_t) {
// int printf(const char *format, ...);
func Xprintf(t *TLS, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := write(printf(format, args))
return int32(n)
}
// int snprintf(char *str, size_t size, const char *format, ...);
func Xsnprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v args=%v, (%v:)", t, str, size, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if format == 0 {
return 0
}
@@ -551,6 +921,10 @@ func Xsnprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) (r
// int __builtin___snprintf_chk(char * str, size_t maxlen, int flag, size_t os, const char * format, ...);
func X__builtin___snprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag int32, os types.Size_t, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v str=%v maxlen=%v flag=%v os=%v args=%v, (%v:)", t, str, maxlen, flag, os, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if os != ^types.Size_t(0) && maxlen > os {
Xabort(t)
}
@@ -560,6 +934,10 @@ func X__builtin___snprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag in
// int __builtin___vsnprintf_chk (char *s, size_t maxlen, int flag, size_t os, const char *fmt, va_list ap);
func X__builtin___vsnprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag int32, os types.Size_t, format, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v str=%v maxlen=%v flag=%v os=%v args=%v, (%v:)", t, str, maxlen, flag, os, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if os != ^types.Size_t(0) && maxlen > os {
Xabort(t)
}
@@ -569,6 +947,21 @@ func X__builtin___vsnprintf_chk(t *TLS, str uintptr, maxlen types.Size_t, flag i
// int abs(int j);
func Xabs(t *TLS, j int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v j=%v, (%v:)", t, j, origin(2))
+ }
+ if j >= 0 {
+ return j
+ }
+
+ return -j
+}
+
+// long abs(long j);
+func Xlabs(t *TLS, j long) long {
+ if __ccgo_strace {
+ trc("t=%v j=%v, (%v:)", t, j, origin(2))
+ }
if j >= 0 {
return j
}
@@ -577,6 +970,9 @@ func Xabs(t *TLS, j int32) int32 {
}
func Xllabs(tls *TLS, a int64) int64 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
if a >= int64(0) {
return a
}
@@ -584,54 +980,291 @@ func Xllabs(tls *TLS, a int64) int64 {
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) }
-func Xasinh(t *TLS, x float64) float64 { return math.Asinh(x) }
-func Xatan(t *TLS, x float64) float64 { return math.Atan(x) }
-func Xatan2(t *TLS, x, y float64) float64 { return math.Atan2(x, y) }
-func Xatanh(t *TLS, x float64) float64 { return math.Atanh(x) }
-func Xceil(t *TLS, x float64) float64 { return math.Ceil(x) }
-func Xceilf(t *TLS, x float32) float32 { return float32(math.Ceil(float64(x))) }
-func Xcopysign(t *TLS, x, y float64) float64 { return math.Copysign(x, y) }
-func Xcopysignf(t *TLS, x, y float32) float32 { return float32(math.Copysign(float64(x), float64(y))) }
-func Xcos(t *TLS, x float64) float64 { return math.Cos(x) }
-func Xcosf(t *TLS, x float32) float32 { return float32(math.Cos(float64(x))) }
-func Xcosh(t *TLS, x float64) float64 { return math.Cosh(x) }
-func Xexp(t *TLS, x float64) float64 { return math.Exp(x) }
-func Xfabs(t *TLS, x float64) float64 { return math.Abs(x) }
-func Xfabsf(t *TLS, x float32) float32 { return float32(math.Abs(float64(x))) }
-func Xfloor(t *TLS, x float64) float64 { return math.Floor(x) }
-func Xfmod(t *TLS, x, y float64) float64 { return math.Mod(x, y) }
-func Xhypot(t *TLS, x, y float64) float64 { return math.Hypot(x, y) }
-func Xisnan(t *TLS, x float64) int32 { return X__builtin_isnan(t, x) }
-func Xisnanf(t *TLS, x float32) int32 { return Bool32(math.IsNaN(float64(x))) }
-func Xisnanl(t *TLS, x float64) int32 { return Bool32(math.IsNaN(x)) } // ccgo has to handle long double as double as Go does not support long double.
-func Xldexp(t *TLS, x float64, exp int32) float64 { return math.Ldexp(x, int(exp)) }
-func Xlog(t *TLS, x float64) float64 { return math.Log(x) }
-func Xlog10(t *TLS, x float64) float64 { return math.Log10(x) }
-func Xlog2(t *TLS, x float64) float64 { return math.Log2(x) }
-func Xround(t *TLS, x float64) float64 { return math.Round(x) }
-func X__builtin_round(t *TLS, x float64) float64 { return math.Round(x) }
-func Xsin(t *TLS, x float64) float64 { return math.Sin(x) }
-func Xsinf(t *TLS, x float32) float32 { return float32(math.Sin(float64(x))) }
-func Xsinh(t *TLS, x float64) float64 { return math.Sinh(x) }
-func Xsqrt(t *TLS, x float64) float64 { return math.Sqrt(x) }
-func Xtan(t *TLS, x float64) float64 { return math.Tan(x) }
-func Xtanh(t *TLS, x float64) float64 { return math.Tanh(x) }
-func Xtrunc(t *TLS, x float64) float64 { return math.Trunc(x) }
+func X__builtin_isnan(t *TLS, x float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Bool32(math.IsNaN(x))
+}
+
+func X__builtin_llabs(tls *TLS, a int64) int64 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return Xllabs(tls, a)
+}
+
+func Xacos(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Acos(x)
+}
+
+func Xacosh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Acosh(x)
+}
+
+func Xasin(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Asin(x)
+}
+
+func Xasinh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Asinh(x)
+}
+
+func Xatan(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Atan(x)
+}
+
+func Xatan2(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return math.Atan2(x, y)
+}
+
+func Xatanh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Atanh(x)
+}
+
+func Xceil(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Ceil(x)
+}
+
+func Xceilf(t *TLS, x float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return float32(math.Ceil(float64(x)))
+}
+
+func Xcopysign(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return math.Copysign(x, y)
+}
+
+func Xcopysignf(t *TLS, x, y float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return float32(math.Copysign(float64(x), float64(y)))
+}
+
+func Xcos(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Cos(x)
+}
+
+func Xcosf(t *TLS, x float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return float32(math.Cos(float64(x)))
+}
+
+func Xcosh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Cosh(x)
+}
+
+func Xexp(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Exp(x)
+}
+
+func Xfabs(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Abs(x)
+}
+
+func Xfabsf(t *TLS, x float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return float32(math.Abs(float64(x)))
+}
+
+func Xfloor(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Floor(x)
+}
+
+func Xfmod(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return math.Mod(x, y)
+}
+
+func Xhypot(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return math.Hypot(x, y)
+}
+
+func Xisnan(t *TLS, x float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return X__builtin_isnan(t, x)
+}
+
+func Xisnanf(t *TLS, x float32) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Bool32(math.IsNaN(float64(x)))
+}
+
+func Xisnanl(t *TLS, x float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Bool32(math.IsNaN(x))
+} // ccgo has to handle long double as double as Go does not support long double.
+
+func Xldexp(t *TLS, x float64, exp int32) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v exp=%v, (%v:)", t, x, exp, origin(2))
+ }
+ return math.Ldexp(x, int(exp))
+}
+
+func Xlog(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Log(x)
+}
+
+func Xlog10(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Log10(x)
+}
+
+func X__builtin_log2(t *TLS, x float64) float64 {
+ return Xlog2(t, x)
+}
+
+func Xlog2(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Log2(x)
+}
+
+func Xround(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Round(x)
+}
+
+func X__builtin_round(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Round(x)
+}
+
+func Xsin(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Sin(x)
+}
+
+func Xsinf(t *TLS, x float32) float32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return float32(math.Sin(float64(x)))
+}
+
+func Xsinh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Sinh(x)
+}
+
+func Xsqrt(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Sqrt(x)
+}
+
+func Xtan(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Tan(x)
+}
+
+func Xtanh(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Tanh(x)
+}
+
+func Xtrunc(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Trunc(x)
+}
var nextRand = uint64(1)
// int rand(void);
func Xrand(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
nextRand = nextRand*1103515245 + 12345
return int32(uint32(nextRand / (math.MaxUint32 + 1) % math.MaxInt32))
}
func Xpow(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
r := math.Pow(x, y)
if x > 0 && r == 1 && y >= -1.0000000000000000715e-18 && y < -1e-30 {
r = 0.9999999999999999
@@ -640,12 +1273,18 @@ func Xpow(t *TLS, x, y float64) float64 {
}
func Xfrexp(t *TLS, x float64, exp uintptr) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v exp=%v, (%v:)", t, x, exp, origin(2))
+ }
f, e := math.Frexp(x)
*(*int32)(unsafe.Pointer(exp)) = int32(e)
return f
}
func Xmodf(t *TLS, x float64, iptr uintptr) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v iptr=%v, (%v:)", t, x, iptr, origin(2))
+ }
i, f := math.Modf(x)
*(*float64)(unsafe.Pointer(iptr)) = i
return f
@@ -653,6 +1292,10 @@ func Xmodf(t *TLS, x float64, iptr uintptr) float64 {
// char *strncpy(char *dest, const char *src, size_t n)
func Xstrncpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
r = dest
for c := *(*int8)(unsafe.Pointer(src)); c != 0 && n > 0; n-- {
*(*int8)(unsafe.Pointer(dest)) = c
@@ -669,6 +1312,10 @@ func Xstrncpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) {
// char * __builtin___strncpy_chk (char *dest, const char *src, size_t n, size_t os);
func X__builtin___strncpy_chk(t *TLS, dest, src uintptr, n, os types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if n != ^types.Size_t(0) && os < n {
Xabort(t)
}
@@ -678,6 +1325,9 @@ func X__builtin___strncpy_chk(t *TLS, dest, src uintptr, n, os types.Size_t) (r
// int strcmp(const char *s1, const char *s2)
func Xstrcmp(t *TLS, s1, s2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v, (%v:)", t, s2, origin(2))
+ }
for {
ch1 := *(*byte)(unsafe.Pointer(s1))
s1++
@@ -691,6 +1341,10 @@ func Xstrcmp(t *TLS, s1, s2 uintptr) int32 {
// size_t strlen(const char *s)
func Xstrlen(t *TLS, s uintptr) (r types.Size_t) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if s == 0 {
return 0
}
@@ -703,6 +1357,10 @@ func Xstrlen(t *TLS, s uintptr) (r types.Size_t) {
// char *strcat(char *dest, const char *src)
func Xstrcat(t *TLS, dest, src uintptr) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
r = dest
for *(*int8)(unsafe.Pointer(dest)) != 0 {
dest++
@@ -720,11 +1378,18 @@ func Xstrcat(t *TLS, dest, src uintptr) (r uintptr) {
// char * __builtin___strcat_chk (char *dest, const char *src, size_t os);
func X__builtin___strcat_chk(t *TLS, dest, src uintptr, os types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return Xstrcat(t, dest, src)
}
// int strncmp(const char *s1, const char *s2, size_t n)
func Xstrncmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v n=%v, (%v:)", t, s2, n, origin(2))
+ }
var ch1, ch2 byte
for ; n != 0; n-- {
ch1 = *(*byte)(unsafe.Pointer(s1))
@@ -744,6 +1409,10 @@ func Xstrncmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 {
// char *strcpy(char *dest, const char *src)
func Xstrcpy(t *TLS, dest, src uintptr) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
r = dest
// src0 := src
for ; ; dest++ {
@@ -758,6 +1427,9 @@ func Xstrcpy(t *TLS, dest, src uintptr) (r uintptr) {
// char *strchr(const char *s, int c)
func Xstrchr(t *TLS, s uintptr, c int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v, (%v:)", t, s, c, origin(2))
+ }
for {
ch2 := *(*byte)(unsafe.Pointer(s))
if ch2 == byte(c) {
@@ -774,6 +1446,10 @@ func Xstrchr(t *TLS, s uintptr, c int32) uintptr {
// char *strrchr(const char *s, int c)
func Xstrrchr(t *TLS, s uintptr, c int32) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v, (%v:)", t, s, c, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
for {
ch2 := *(*byte)(unsafe.Pointer(s))
if ch2 == 0 {
@@ -789,6 +1465,9 @@ func Xstrrchr(t *TLS, s uintptr, c int32) (r uintptr) {
// void *memset(void *s, int c, size_t n)
func Xmemset(t *TLS, s uintptr, c int32, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v n=%v, (%v:)", t, s, c, n, origin(2))
+ }
if n != 0 {
c := byte(c & 0xff)
@@ -822,6 +1501,10 @@ func Xmemset(t *TLS, s uintptr, c int32, n types.Size_t) uintptr {
// void *memcpy(void *dest, const void *src, size_t n);
func Xmemcpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if n != 0 {
copy((*RawMem)(unsafe.Pointer(dest))[:n:n], (*RawMem)(unsafe.Pointer(src))[:n:n])
}
@@ -830,6 +1513,9 @@ func Xmemcpy(t *TLS, dest, src uintptr, n types.Size_t) (r uintptr) {
// int memcmp(const void *s1, const void *s2, size_t n);
func Xmemcmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v n=%v, (%v:)", t, s2, n, origin(2))
+ }
for ; n != 0; n-- {
c1 := *(*byte)(unsafe.Pointer(s1))
s1++
@@ -848,6 +1534,9 @@ func Xmemcmp(t *TLS, s1, s2 uintptr, n types.Size_t) int32 {
// void *memchr(const void *s, int c, size_t n);
func Xmemchr(t *TLS, s uintptr, c int32, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v n=%v, (%v:)", t, s, c, n, origin(2))
+ }
for ; n != 0; n-- {
if *(*byte)(unsafe.Pointer(s)) == byte(c) {
return s
@@ -860,6 +1549,9 @@ func Xmemchr(t *TLS, s uintptr, c int32, n types.Size_t) uintptr {
// void *memmove(void *dest, const void *src, size_t n);
func Xmemmove(t *TLS, dest, src uintptr, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2))
+ }
if n == 0 {
return dest
}
@@ -870,6 +1562,9 @@ func Xmemmove(t *TLS, dest, src uintptr, n types.Size_t) uintptr {
// void * __builtin___memmove_chk (void *dest, const void *src, size_t n, size_t os);
func X__builtin___memmove_chk(t *TLS, dest, src uintptr, n, os types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v src=%v os=%v, (%v:)", t, src, os, origin(2))
+ }
if os != ^types.Size_t(0) && os < n {
Xabort(t)
}
@@ -879,6 +1574,9 @@ func X__builtin___memmove_chk(t *TLS, dest, src uintptr, n, os types.Size_t) uin
// char *getenv(const char *name);
func Xgetenv(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
return getenv(Environ(), GoString(name))
}
@@ -903,6 +1601,9 @@ func getenv(p uintptr, nm string) uintptr {
// char *strstr(const char *haystack, const char *needle);
func Xstrstr(t *TLS, haystack, needle uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v needle=%v, (%v:)", t, needle, origin(2))
+ }
hs := GoString(haystack)
nd := GoString(needle)
if i := strings.Index(hs, nd); i >= 0 {
@@ -915,11 +1616,17 @@ func Xstrstr(t *TLS, haystack, needle uintptr) uintptr {
// int putc(int c, FILE *stream);
func Xputc(t *TLS, c int32, fp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v fp=%v, (%v:)", t, c, fp, origin(2))
+ }
return Xfputc(t, c, fp)
}
// int atoi(const char *nptr);
func Xatoi(t *TLS, nptr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nptr=%v, (%v:)", t, nptr, origin(2))
+ }
_, neg, _, n, _ := strToUint64(t, nptr, 10)
switch {
@@ -932,6 +1639,9 @@ func Xatoi(t *TLS, nptr uintptr) int32 {
// double atof(const char *nptr);
func Xatof(t *TLS, nptr uintptr) float64 {
+ if __ccgo_strace {
+ trc("t=%v nptr=%v, (%v:)", t, nptr, origin(2))
+ }
n, _ := strToFloatt64(t, nptr, 64)
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(nptr), n)
@@ -941,6 +1651,9 @@ func Xatof(t *TLS, nptr uintptr) float64 {
// int tolower(int c);
func Xtolower(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
if c >= 'A' && c <= 'Z' {
return c + ('a' - 'A')
}
@@ -950,6 +1663,9 @@ func Xtolower(t *TLS, c int32) int32 {
// int toupper(int c);
func Xtoupper(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
if c >= 'a' && c <= 'z' {
return c - ('a' - 'A')
}
@@ -959,11 +1675,17 @@ func Xtoupper(t *TLS, c int32) int32 {
// int isatty(int fd);
func Xisatty(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
return Bool32(isatty.IsTerminal(uintptr(fd)))
}
// long atol(const char *nptr);
func Xatol(t *TLS, nptr uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v nptr=%v, (%v:)", t, nptr, origin(2))
+ }
_, neg, _, n, _ := strToUint64(t, nptr, 10)
switch {
case neg:
@@ -990,6 +1712,9 @@ func getLocalLocation() (loc *gotime.Location) {
// time_t mktime(struct tm *tm);
func Xmktime(t *TLS, ptm uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v ptm=%v, (%v:)", t, ptm, origin(2))
+ }
loc := getLocalLocation()
tt := gotime.Date(
int((*time.Tm)(unsafe.Pointer(ptm)).Ftm_year+1900),
@@ -1008,6 +1733,9 @@ func Xmktime(t *TLS, ptm uintptr) time.Time_t {
// char *strpbrk(const char *s, const char *accept);
func Xstrpbrk(t *TLS, s, accept uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v accept=%v, (%v:)", t, accept, origin(2))
+ }
bits := newBits(256)
for {
b := *(*byte)(unsafe.Pointer(accept))
@@ -1034,6 +1762,9 @@ func Xstrpbrk(t *TLS, s, accept uintptr) uintptr {
// int strcasecmp(const char *s1, const char *s2);
func Xstrcasecmp(t *TLS, s1, s2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v s2=%v, (%v:)", t, s2, origin(2))
+ }
for {
ch1 := *(*byte)(unsafe.Pointer(s1))
if ch1 >= 'a' && ch1 <= 'z' {
@@ -1053,11 +1784,17 @@ func Xstrcasecmp(t *TLS, s1, s2 uintptr) int32 {
}
func Xntohs(t *TLS, netshort uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v netshort=%v, (%v:)", t, netshort, origin(2))
+ }
return uint16((*[2]byte)(unsafe.Pointer(&netshort))[0])<<8 | uint16((*[2]byte)(unsafe.Pointer(&netshort))[1])
}
// uint16_t htons(uint16_t hostshort);
func Xhtons(t *TLS, hostshort uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v hostshort=%v, (%v:)", t, hostshort, origin(2))
+ }
var a [2]byte
a[0] = byte(hostshort >> 8)
a[1] = byte(hostshort)
@@ -1066,6 +1803,9 @@ func Xhtons(t *TLS, hostshort uint16) uint16 {
// uint32_t htonl(uint32_t hostlong);
func Xhtonl(t *TLS, hostlong uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v hostlong=%v, (%v:)", t, hostlong, origin(2))
+ }
var a [4]byte
a[0] = byte(hostlong >> 24)
a[1] = byte(hostlong >> 16)
@@ -1076,6 +1816,9 @@ func Xhtonl(t *TLS, hostlong uint32) uint32 {
// FILE *fopen(const char *pathname, const char *mode);
func Xfopen(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
return Xfopen64(t, pathname, mode) //TODO 32 bit
}
@@ -1087,6 +1830,9 @@ func Dmesg(s string, args ...interface{}) {
// void sqlite3_log(int iErrCode, const char *zFormat, ...);
func X__ccgo_sqlite3_log(t *TLS, iErrCode int32, zFormat uintptr, args uintptr) {
+ if __ccgo_strace {
+ trc("t=%v iErrCode=%v zFormat=%v args=%v, (%v:)", t, iErrCode, zFormat, args, origin(2))
+ }
// if dmesgs {
// dmesg("%v: iErrCode: %v, msg: %s\n%s", origin(1), iErrCode, printf(zFormat, args), debug.Stack())
// }
@@ -1094,11 +1840,17 @@ func X__ccgo_sqlite3_log(t *TLS, iErrCode int32, zFormat uintptr, args uintptr)
// int _IO_putc(int __c, _IO_FILE *__fp);
func X_IO_putc(t *TLS, c int32, fp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v fp=%v, (%v:)", t, c, fp, origin(2))
+ }
return Xputc(t, c, fp)
}
// int atexit(void (*function)(void));
func Xatexit(t *TLS, function uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v function=%v, (%v:)", t, function, origin(2))
+ }
AtExit(func() {
(*struct{ f func(*TLS) })(unsafe.Pointer(&struct{ uintptr }{function})).f(t)
})
@@ -1107,6 +1859,9 @@ func Xatexit(t *TLS, function uintptr) int32 {
// int vasprintf(char **strp, const char *fmt, va_list ap);
func Xvasprintf(t *TLS, strp, fmt, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
@@ -1218,31 +1973,49 @@ func AtomicAddFloat64(addr *float64, delta float64) (new float64) {
// size_t mbstowcs(wchar_t *dest, const char *src, size_t n);
func Xmbstowcs(t *TLS, dest, src uintptr, n types.Size_t) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v src=%v n=%v, (%v:)", t, src, n, origin(2))
+ }
panic(todo(""))
}
// int mbtowc(wchar_t *pwc, const char *s, size_t n);
func Xmbtowc(t *TLS, pwc, s uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s=%v n=%v, (%v:)", t, s, n, origin(2))
+ }
panic(todo(""))
}
// size_t __ctype_get_mb_cur_max(void);
func X__ctype_get_mb_cur_max(t *TLS) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int wctomb(char *s, wchar_t wc);
func Xwctomb(t *TLS, s uintptr, wc wchar_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s=%v wc=%v, (%v:)", t, s, wc, origin(2))
+ }
panic(todo(""))
}
// int mblen(const char *s, size_t n);
func Xmblen(t *TLS, s uintptr, n types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v s=%v n=%v, (%v:)", t, s, n, origin(2))
+ }
panic(todo(""))
}
// ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
func Xreadv(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
panic(todo(""))
}
@@ -1251,11 +2024,17 @@ func Xreadv(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
// const struct termios *termp,
// const struct winsize *winp);
func Xopenpty(t *TLS, amaster, aslave, name, termp, winp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v winp=%v, (%v:)", t, winp, origin(2))
+ }
panic(todo(""))
}
// pid_t setsid(void);
func Xsetsid(t *TLS) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
@@ -1264,26 +2043,41 @@ func Xsetsid(t *TLS) types.Pid_t {
// fd_set *exceptfds, const struct timespec *timeout,
// const sigset_t *sigmask);
func Xpselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout, sigmask uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v sigmask=%v, (%v:)", t, nfds, sigmask, origin(2))
+ }
panic(todo(""))
}
// int kill(pid_t pid, int sig);
func Xkill(t *TLS, pid types.Pid_t, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pid=%v sig=%v, (%v:)", t, pid, sig, origin(2))
+ }
panic(todo(""))
}
// int tcsendbreak(int fd, int duration);
func Xtcsendbreak(t *TLS, fd, duration int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v duration=%v, (%v:)", t, duration, origin(2))
+ }
panic(todo(""))
}
// int wcwidth(wchar_t c);
func Xwcwidth(t *TLS, c wchar_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
panic(todo(""))
}
// int clock_gettime(clockid_t clk_id, struct timespec *tp);
func Xclock_gettime(t *TLS, clk_id int32, tp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v clk_id=%v tp=%v, (%v:)", t, clk_id, tp, origin(2))
+ }
panic(todo(""))
}
@@ -1297,6 +2091,9 @@ func AtExit(f func()) {
}
func X__ccgo_dmesg(t *TLS, fmt uintptr, va uintptr) {
+ if __ccgo_strace {
+ trc("t=%v fmt=%v va=%v, (%v:)", t, fmt, va, origin(2))
+ }
if dmesgs {
dmesg("%s", printf(fmt, va))
}
@@ -1308,6 +2105,9 @@ func X__ccgo_dmesg(t *TLS, fmt uintptr, va uintptr) {
// to the buffer starting at the location pointed to by buffer. The maximum
// permitted value for the length argument is 256.
func Xgetentropy(t *TLS, buffer uintptr, length size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v length=%v, (%v:)", t, buffer, length, origin(2))
+ }
const max = 256
switch {
case length == 0:
@@ -1330,6 +2130,9 @@ func Xgetentropy(t *TLS, buffer uintptr, length size_t) int32 {
// void * reallocarray(void *ptr, size_t nmemb, size_t size);
func Xreallocarray(t *TLS, ptr uintptr, nmemb, size size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
+ }
hi, lo := mathutil.MulUint128_64(uint64(nmemb), uint64(size))
if hi != 0 || lo > uint64(unsafe.Sizeof(RawMem{})) {
t.setErrno(errno.ENOMEM)
@@ -1341,11 +2144,17 @@ func Xreallocarray(t *TLS, ptr uintptr, nmemb, size size_t) uintptr {
// int setjmp(jmp_buf env);
func Xsetjmp(t *TLS, env uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v env=%v, (%v:)", t, env, origin(2))
+ }
return 0 //TODO
}
// void longjmp(jmp_buf env, int val);
func Xlongjmp(t *TLS, env uintptr, val int32) {
+ if __ccgo_strace {
+ trc("t=%v env=%v val=%v, (%v:)", t, env, val, origin(2))
+ }
panic(todo(""))
}
@@ -1357,36 +2166,57 @@ func Xlongjmp(t *TLS, env uintptr, val int32) {
// int _setjmp(jmp_buf env);
func X_setjmp(t *TLS, env uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v env=%v, (%v:)", t, env, origin(2))
+ }
return 0 //TODO
}
// void _longjmp(jmp_buf env, int val);
func X_longjmp(t *TLS, env uintptr, val int32) {
+ if __ccgo_strace {
+ trc("t=%v env=%v val=%v, (%v:)", t, env, val, origin(2))
+ }
panic(todo(""))
}
// unsigned __sync_add_and_fetch_uint32(*unsigned, unsigned)
func X__sync_add_and_fetch_uint32(t *TLS, p uintptr, v uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v p=%v v=%v, (%v:)", t, p, v, origin(2))
+ }
return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), v)
}
// unsigned __sync_sub_and_fetch_uint32(*unsigned, unsigned)
func X__sync_sub_and_fetch_uint32(t *TLS, p uintptr, v uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v p=%v v=%v, (%v:)", t, p, v, origin(2))
+ }
return atomic.AddUint32((*uint32)(unsafe.Pointer(p)), -v)
}
// int sched_yield(void);
func Xsched_yield(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
runtime.Gosched()
}
// int getc(FILE *stream);
func Xgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Xfgetc(t, stream)
}
// char *fgets(char *s, int size, FILE *stream);
func Xfgets(t *TLS, s uintptr, size int32, stream uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v size=%v stream=%v, (%v:)", t, s, size, stream, origin(2))
+ }
var b []byte
out:
for ; size > 0; size-- {
@@ -1411,6 +2241,9 @@ out:
// void bzero(void *s, size_t n);
func Xbzero(t *TLS, s uintptr, n types.Size_t) {
+ if __ccgo_strace {
+ trc("t=%v s=%v n=%v, (%v:)", t, s, n, origin(2))
+ }
b := (*RawMem)(unsafe.Pointer(s))[:n]
for i := range b {
b[i] = 0
@@ -1419,6 +2252,9 @@ func Xbzero(t *TLS, s uintptr, n types.Size_t) {
// char *rindex(const char *s, int c);
func Xrindex(t *TLS, s uintptr, c int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v c=%v, (%v:)", t, s, c, origin(2))
+ }
if s == 0 {
return 0
}
@@ -1440,10 +2276,16 @@ func Xrindex(t *TLS, s uintptr, c int32) uintptr {
// int isascii(int c);
func Xisascii(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
return Bool32(c >= 0 && c <= 0x7f)
}
func X__builtin_isunordered(t *TLS, a, b float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v b=%v, (%v:)", t, b, origin(2))
+ }
return Bool32(math.IsNaN(a) || math.IsNaN(b))
}
@@ -1475,13 +2317,95 @@ func PreInrAtomicUintptrP(p uintptr, d uintptr) uintptr {
}
func X__builtin_ffs(tls *TLS, i int32) (r int32) {
+ if __ccgo_strace {
+ trc("tls=%v i=%v, (%v:)", tls, i, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return Xffs(tls, i)
}
func Xffs(tls *TLS, i int32) (r int32) {
+ if __ccgo_strace {
+ trc("tls=%v i=%v, (%v:)", tls, i, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if i == 0 {
return 0
}
return int32(mbits.TrailingZeros32(uint32(i))) + 1
}
+
+var _toint5 = Float32FromInt32(1) / Float32FromFloat32(1.1920928955078125e-07)
+
+func X__builtin_rintf(tls *TLS, x float32) (r float32) {
+ return Xrintf(tls, x)
+}
+
+func Xrintf(tls *TLS, x float32) (r float32) {
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+ var e, s int32
+ var y float32
+ var v1 float32
+ var _ /* u at bp+0 */ struct {
+ Fi [0]uint32
+ Ff float32
+ }
+ _, _, _, _ = e, s, y, v1
+ *(*struct {
+ Fi [0]uint32
+ Ff float32
+ })(unsafe.Pointer(bp)) = struct {
+ Fi [0]uint32
+ Ff float32
+ }{}
+ *(*float32)(unsafe.Pointer(bp)) = x
+ e = int32(*(*uint32)(unsafe.Pointer(bp)) >> int32(23) & uint32(0xff))
+ s = int32(*(*uint32)(unsafe.Pointer(bp)) >> int32(31))
+ if e >= Int32FromInt32(0x7f)+Int32FromInt32(23) {
+ return x
+ }
+ if s != 0 {
+ y = x - _toint5 + _toint5
+ } else {
+ y = x + _toint5 - _toint5
+ }
+ if y == Float32FromInt32(0) {
+ if s != 0 {
+ v1 = -Float32FromFloat32(0)
+ } else {
+ v1 = Float32FromFloat32(0)
+ }
+ return v1
+ }
+ return y
+}
+
+func X__builtin_lrintf(tls *TLS, x float32) (r long) {
+ return Xlrintf(tls, x)
+}
+
+func Xlrintf(tls *TLS, x float32) (r long) {
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return long(Xrintf(tls, x))
+}
+
+func X__builtin_lrint(tls *TLS, x float64) (r long) {
+ return Xlrint(tls, x)
+}
+
+func Xlrint(tls *TLS, x float64) (r long) {
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return long(Xrint(tls, x))
+}
diff --git a/vendor/modernc.org/libc/libc32.go b/vendor/modernc.org/libc/libc32.go
index c66732e48..b0943d254 100644
--- a/vendor/modernc.org/libc/libc32.go
+++ b/vendor/modernc.org/libc/libc32.go
@@ -36,6 +36,10 @@ func newBits(n int) (r bits) { return make(bits, (n+31)>>5) }
func (b bits) has(n int) bool { return b != nil && b[n>>5]&(1<<uint(n&31)) != 0 }
func (b bits) set(n int) { b[n>>5] |= 1 << uint(n&31) }
+func Xstrchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
+ return x___strchrnul(tls, s, c)
+}
+
func x___strchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
var k types.Size_t
var w uintptr
diff --git a/vendor/modernc.org/libc/libc64.go b/vendor/modernc.org/libc/libc64.go
index 6047a5ec4..d39ea999a 100644
--- a/vendor/modernc.org/libc/libc64.go
+++ b/vendor/modernc.org/libc/libc64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build amd64 || arm64 || ppc64le || riscv64 || s390x || loong64
-// +build amd64 arm64 ppc64le riscv64 s390x loong64
+//go:build amd64 || arm64 || ppc64le || riscv64 || s390x || loong64 || mips64le
+// +build amd64 arm64 ppc64le riscv64 s390x loong64 mips64le
package libc // import "modernc.org/libc"
@@ -35,6 +35,10 @@ func (b bits) has(n int) bool { return b != nil && b[n>>6]&(1<<uint(n&63)) != 0
func (b bits) set(n int) { b[n>>6] |= 1 << uint(n&63) }
func Xstrchrnul(tls *TLS, s uintptr, c int32) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
var k types.Size_t
var w uintptr
_, _ = k, w
diff --git a/vendor/modernc.org/libc/libc_386.go b/vendor/modernc.org/libc/libc_386.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_386.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_amd64.go b/vendor/modernc.org/libc/libc_amd64.go
index c17aee5c1..de3e34974 100644
--- a/vendor/modernc.org/libc/libc_amd64.go
+++ b/vendor/modernc.org/libc/libc_amd64.go
@@ -22,3 +22,17 @@ func a_load_16(addr uintptr) uint32 {
return uint32(*(*uint16)(unsafe.Pointer(addr)))
}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_arm.go b/vendor/modernc.org/libc/libc_arm.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_arm.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_arm64.go b/vendor/modernc.org/libc/libc_arm64.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_arm64.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_darwin.go b/vendor/modernc.org/libc/libc_darwin.go
index 334bf8fe1..e73256a8e 100644
--- a/vendor/modernc.org/libc/libc_darwin.go
+++ b/vendor/modernc.org/libc/libc_darwin.go
@@ -121,24 +121,50 @@ func fwrite(fd int32, b []byte) (int, error) {
return unix.Write(int(fd), b)
}
-func X__inline_isnand(t *TLS, x float64) int32 { return Xisnan(t, x) }
-func X__inline_isnanf(t *TLS, x float32) int32 { return Xisnanf(t, x) }
-func X__inline_isnanl(t *TLS, x float64) int32 { return Xisnan(t, x) }
+func X__inline_isnand(t *TLS, x float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xisnan(t, x)
+}
+
+func X__inline_isnanf(t *TLS, x float32) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xisnanf(t, x)
+}
+
+func X__inline_isnanl(t *TLS, x float64) int32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return Xisnan(t, x)
+}
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args))
return int32(n)
}
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec types.Useconds_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
gotime.Sleep(gotime.Microsecond * gotime.Duration(usec))
return 0
}
// int futimes(int fd, const struct timeval tv[2]);
func Xfutimes(t *TLS, fd int32, tv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v tv=%v, (%v:)", t, fd, tv, origin(2))
+ }
var a []unix.Timeval
if tv != 0 {
a = make([]unix.Timeval, 2)
@@ -161,11 +187,17 @@ func Xfutimes(t *TLS, fd int32, tv uintptr) int32 {
// void srandomdev(void);
func Xsrandomdev(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int gethostuuid(uuid_t id, const struct timespec *wait);
func Xgethostuuid(t *TLS, id uintptr, wait uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v id=%v wait=%v, (%v:)", t, id, wait, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETHOSTUUID, id, wait, 0); err != 0 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -182,6 +214,9 @@ func Xgethostuuid(t *TLS, id uintptr, wait uintptr) int32 {
// int flock(int fd, int operation);
func Xflock(t *TLS, fd, operation int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v operation=%v, (%v:)", t, operation, origin(2))
+ }
if err := unix.Flock(int(fd), int(operation)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -198,6 +233,9 @@ func Xflock(t *TLS, fd, operation int32) int32 {
// int fsctl(const char *,unsigned long,void*,unsigned int);
func Xfsctl(t *TLS, path uintptr, request ulong, data uintptr, options uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v request=%v data=%v options=%v, (%v:)", t, path, request, data, options, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall6(unix.SYS_FSCTL, path, uintptr(request), data, uintptr(options), 0, 0); err != 0 {
// t.setErrno(err)
@@ -209,16 +247,25 @@ func Xfsctl(t *TLS, path uintptr, request ulong, data uintptr, options uint32) i
// int * __error(void);
func X__error(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
// int isspace(int c);
func Xisspace(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
return __isspace(t, c)
}
// void __assert_rtn(const char *, const char *, int, const char *)
func X__assert_rtn(t *TLS, function, file uintptr, line int32, assertion uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v assertion=%v, (%v:)", t, file, line, assertion, origin(2))
+ }
panic(todo(""))
// fmt.Fprintf(os.Stderr, "assertion failure: %s:%d.%s: %s\n", GoString(file), line, GoString(function), GoString(assertion))
// os.Stderr.Sync()
@@ -227,6 +274,9 @@ func X__assert_rtn(t *TLS, function, file uintptr, line int32, assertion uintptr
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
// t.setErrno(err)
@@ -238,6 +288,9 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int fgetc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file)
var buf [1]byte
if n, _ := unix.Read(fd, buf[:]); n != 0 {
@@ -249,16 +302,25 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
if err := unix.Chdir(GoString(path)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -311,6 +373,9 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
@@ -332,6 +397,9 @@ func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -352,6 +420,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if noFsync {
// Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
@@ -373,6 +444,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
switch name {
case unistd.X_SC_PAGESIZE:
return long(unix.Getpagesize())
@@ -385,6 +459,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if err := unix.Close(int(fd)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -401,6 +478,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -417,11 +497,17 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if err := unix.Ftruncate(int(fd), int64(length)); err != nil {
if dmesgs {
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
@@ -438,11 +524,17 @@ func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
// ssize_t read(int fd, void *buf, size_t count);
func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
var n int
var err error
switch {
@@ -470,6 +562,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// ssize_t write(int fd, const void *buf, size_t count);
func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
var n int
var err error
switch {
@@ -497,6 +592,9 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
if err := unix.Fchmod(int(fd), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %d %#o: %v FAIL", origin(1), fd, mode, err)
@@ -513,6 +611,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int fchown(int fd, uid_t owner, gid_t group);
func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -523,6 +624,9 @@ func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
// uid_t geteuid(void);
func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r := types.Uid_t(unix.Geteuid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
@@ -532,6 +636,9 @@ func Xgeteuid(t *TLS) types.Uid_t {
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
// Cannot avoid the syscall here, addr sometimes matter.
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
@@ -550,6 +657,9 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 { // Cannot avoid the syscall here, must pair with mmap.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -563,6 +673,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
if tz != 0 {
panic(todo(""))
}
@@ -583,6 +696,9 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
t.setErrno(err)
return -1
@@ -593,6 +709,9 @@ func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) i
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
t.setErrno(err)
return -1
@@ -603,6 +722,9 @@ func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen so
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
var argp uintptr
if va != 0 {
argp = VaUintptr(&va)
@@ -618,6 +740,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: fd %v: %v FAIL", origin(1), sockfd, err)
@@ -634,6 +759,9 @@ func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
n, err := unix.Select(
int(nfds),
(*unix.FdSet)(unsafe.Pointer(readfds)),
@@ -657,6 +785,9 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil {
t.setErrno(err)
return -1
@@ -667,6 +798,9 @@ func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
return types.Mode_t(unix.Umask(int(mask)))
}
@@ -682,6 +816,9 @@ func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
// pid_t (pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
n, err := unix.Wait4(int(pid), (*unix.WaitStatus)(unsafe.Pointer(wstatus)), int(optname), nil)
if err != nil {
if dmesgs {
@@ -699,6 +836,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -715,6 +855,9 @@ func Xuname(t *TLS, buf uintptr) int32 {
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -726,6 +869,9 @@ func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -737,6 +883,9 @@ func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// int shutdown(int sockfd, int how);
func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
t.setErrno(err)
return -1
@@ -747,6 +896,9 @@ func Xshutdown(t *TLS, sockfd, how int32) int32 {
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -757,6 +909,9 @@ func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int socket(int domain, int type, int protocol);
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
if err != 0 {
t.setErrno(err)
@@ -768,6 +923,9 @@ func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
if err != 0 {
t.setErrno(err)
@@ -779,6 +937,9 @@ func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -789,6 +950,9 @@ func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int listen(int sockfd, int backlog);
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
t.setErrno(err)
return -1
@@ -799,6 +963,9 @@ func Xlisten(t *TLS, sockfd, backlog int32) int32 {
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
// if err != 0 {
@@ -831,6 +998,9 @@ func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// uid_t getuid(void);
func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r := types.Uid_t(os.Getuid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
@@ -840,6 +1010,9 @@ func Xgetuid(t *TLS) types.Uid_t {
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r := int32(os.Getpid())
if dmesgs {
dmesg("%v: %v", origin(1), r)
@@ -849,6 +1022,9 @@ func Xgetpid(t *TLS) int32 {
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -868,11 +1044,17 @@ func Xsystem(t *TLS, command uintptr) int32 {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
@@ -888,6 +1070,9 @@ func Xraise(t *TLS, sig int32) int32 {
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if stream == 0 {
if dmesgs {
dmesg("%v: FAIL", origin(1))
@@ -961,6 +1146,9 @@ func (f *ftstream) close(t *TLS) {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
f := &ftstream{}
var walk func(string)
@@ -1065,6 +1253,9 @@ func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
if dmesgs {
@@ -1087,6 +1278,9 @@ func Xfts_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
getObject(ftsp).(*ftstream).close(t)
removeObject(ftsp)
return 0
@@ -1094,41 +1288,71 @@ func Xfts_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
+var strerrorBuf [100]byte
+
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
+ // if dmesgs {
+ // dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
+ // }
+ copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum))
+ return uintptr(unsafe.Pointer(&strerrorBuf[0]))
}
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo(""))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -1136,6 +1360,9 @@ func Xpclose(t *TLS, stream uintptr) int32 {
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
panic(todo(""))
// copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
// return uintptr(unsafe.Pointer(&gai_strerrorBuf))
@@ -1143,16 +1370,25 @@ func Xgai_strerror(t *TLS, errcode int32) uintptr {
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
// speed_t cfgetospeed(const struct termios *termios_p);
func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
panic(todo(""))
}
@@ -1170,6 +1406,9 @@ func Xcfsetispeed(...interface{}) int32 {
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
if dmesgs {
dmesg("%v: FAIL", origin(1))
}
@@ -1181,21 +1420,33 @@ var emptyStr = [1]byte{}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// char *nl_langinfo(nl_item item);
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1225,22 +1476,26 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
return resolved_path
}
-// struct tm *gmtime_r(const time_t *timep, struct tm *result);
-func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
- panic(todo(""))
-}
-
// char *inet_ntoa(struct in_addr in);
func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
// return uintptr(unsafe.Pointer(&in6_addr_any))
}
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
if dmesgs {
dmesg("%v:", origin(1))
}
@@ -1258,11 +1513,17 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return 0 //TODO
}
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
fd := uintptr(file(stream).fd())
count := size * nmemb
var n int
@@ -1292,6 +1553,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
fd := uintptr(file(stream).fd())
count := size * nmemb
var n int
@@ -1321,6 +1585,9 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
r := file(stream).close(t)
if r != 0 {
if dmesgs {
@@ -1338,6 +1605,9 @@ func Xfclose(t *TLS, stream uintptr) int32 {
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -1347,6 +1617,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
if dmesgs {
dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
@@ -1363,6 +1636,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
if n < 0 {
file(stream).setErr()
@@ -1377,11 +1653,17 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Bool32(file(stream).err())
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
// return -1
@@ -1394,6 +1676,9 @@ var getservbynameStaticResult netdb.Servent
// struct servent *getservbyname(const char *name, const char *proto);
func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
var protoent *gonetdb.Protoent
if proto != 0 {
protoent = gonetdb.GetProtoByName(GoString(proto))
@@ -1528,6 +1813,9 @@ func fcntlCmdStr(cmd int32) string {
// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
var n int
var err error
switch {
@@ -1555,11 +1843,17 @@ func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off
// char***_NSGetEnviron()
func X_NSGetEnviron(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return EnvironP()
}
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1576,6 +1870,9 @@ func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1592,6 +1889,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// uint64_t mach_absolute_time(void);
func Xmach_absolute_time(t *TLS) uint64 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uint64(gotime.Now().UnixNano())
}
@@ -1603,12 +1903,18 @@ type machTimebaseInfo = struct {
// kern_return_t mach_timebase_info(mach_timebase_info_t info);
func Xmach_timebase_info(t *TLS, info uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v info=%v, (%v:)", t, info, origin(2))
+ }
*(*machTimebaseInfo)(unsafe.Pointer(info)) = machTimebaseInfo{Fnumer: 1, Fdenom: 1}
return 0
}
// int getattrlist(const char* path, struct attrlist * attrList, void * attrBuf, size_t attrBufSize, unsigned long options);
func Xgetattrlist(t *TLS, path, attrList, attrBuf uintptr, attrBufSize types.Size_t, options uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v attrBuf=%v attrBufSize=%v options=%v, (%v:)", t, attrBuf, attrBufSize, options, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETATTRLIST, path, attrList, attrBuf, uintptr(attrBufSize), uintptr(options), 0); err != 0 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1625,6 +1931,9 @@ func Xgetattrlist(t *TLS, path, attrList, attrBuf uintptr, attrBufSize types.Siz
// int setattrlist(const char* path, struct attrlist * attrList, void * attrBuf, size_t attrBufSize, unsigned long options);
func Xsetattrlist(t *TLS, path, attrList, attrBuf uintptr, attrBufSize types.Size_t, options uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v attrBuf=%v attrBufSize=%v options=%v, (%v:)", t, attrBuf, attrBufSize, options, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETATTRLIST, path, attrList, attrBuf, uintptr(attrBufSize), uintptr(options), 0); err != 0 { // Cannot avoid the syscall here.
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1640,12 +1949,12 @@ func Xsetattrlist(t *TLS, path, attrList, attrBuf uintptr, attrBufSize types.Siz
}
// int copyfile(const char *from, const char *to, copyfile_state_t state, copyfile_flags_t flags);
-func Xcopyfile(...interface{}) int32 {
+func Xcopyfile(t *TLS, _ ...interface{}) int32 {
panic(todo(""))
}
// int truncate(const char *path, off_t length);
-func Xtruncate(...interface{}) int32 {
+func Xtruncate(t *TLS, _ ...interface{}) int32 {
panic(todo(""))
}
@@ -1660,6 +1969,9 @@ type darwinDir struct {
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -1688,6 +2000,9 @@ func Xopendir(t *TLS, name uintptr) uintptr {
// struct dirent *readdir(DIR *dirp);
func Xreaddir(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
if (*darwinDir)(unsafe.Pointer(dir)).eof {
return 0
}
@@ -1719,6 +2034,9 @@ func Xreaddir(t *TLS, dir uintptr) uintptr {
}
func Xclosedir(t *TLS, dir uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
// trc("---- closedir: %#x", dir)
r := Xclose(t, int32((*darwinDir)(unsafe.Pointer(dir)).fd))
Xfree(t, dir)
@@ -1727,6 +2045,9 @@ func Xclosedir(t *TLS, dir uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
var a [2]int
if err := syscall.Pipe(a[:]); err != nil {
if dmesgs {
@@ -1745,6 +2066,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1754,6 +2078,9 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// int sscanf(const char *str, const char *format, ...);
func Xsscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1763,26 +2090,41 @@ func Xsscanf(t *TLS, str, format, va uintptr) int32 {
// int posix_fadvise(int fd, off_t offset, off_t len, int advice);
func Xposix_fadvise(t *TLS, fd int32, offset, len types.Off_t, advice int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v len=%v advice=%v, (%v:)", t, fd, len, advice, origin(2))
+ }
panic(todo(""))
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// void arc4random_buf(void *buf, size_t nbytes);
func Xarc4random_buf(t *TLS, buf uintptr, buflen size_t) {
+ if __ccgo_strace {
+ trc("t=%v buf=%v buflen=%v, (%v:)", t, buf, buflen, origin(2))
+ }
if _, err := crand.Read((*RawMem)(unsafe.Pointer(buf))[:buflen]); err != nil {
panic(todo(""))
}
@@ -1799,35 +2141,59 @@ type darwin_mutex_t struct {
}
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return (int32((*darwin_mutexattr_t)(unsafe.Pointer(a)).x[4] >> 2 & 3))
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return (int32((*darwin_mutex_t)(unsafe.Pointer(m)).x[4] >> 2 & 3))
}
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
panic(todo(""))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
panic(todo(""))
}
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
panic(todo(""))
}
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*darwin_mutexattr_t)(unsafe.Pointer(a)) = darwin_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 {
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return errno.EINVAL
}
@@ -1837,6 +2203,9 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 {
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
// if dmesgs {
// dmesg("%v: fd %v iov %#x iovcnt %v", origin(1), fd, iov, iovcnt)
// }
@@ -1854,6 +2223,9 @@ func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
// int pause(void);
func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
c := make(chan os.Signal)
gosignal.Notify(c,
syscall.SIGABRT,
@@ -1911,6 +2283,9 @@ func Xpause(t *TLS) int32 {
// (_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: */
+ if __ccgo_strace {
+ trc("tls=%v _fd=%v _p=%v, (%v:)", tls, _fd, _p, origin(2))
+ }
*(*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)
}
@@ -1921,6 +2296,9 @@ func X__darwin_fd_set(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:12:1: *
// 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: */
+ if __ccgo_strace {
+ trc("tls=%v _fd=%v _p=%v, (%v:)", tls, _fd, _p, origin(2))
+ }
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))))
}
@@ -1930,17 +2308,26 @@ func X__darwin_fd_isset(tls *TLS, _fd int32, _p uintptr) int32 { /* main.c:17:1:
// (_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: */
+ if __ccgo_strace {
+ trc("tls=%v _fd=%v _p=%v, (%v:)", tls, _fd, _p, origin(2))
+ }
*(*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)
}
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
panic(todo(""))
}
// int issetugid(void);
func Xissetugid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
@@ -1948,6 +2335,9 @@ var progname uintptr
// const char *getprogname(void);
func Xgetprogname(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
if progname != 0 {
return progname
}
@@ -1964,11 +2354,17 @@ func Xgetprogname(t *TLS) uintptr {
// void uuid_copy(uuid_t dst, uuid_t src);
func Xuuid_copy(t *TLS, dst, src uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ }
*(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
}
// int uuid_parse( char *in, uuid_t uu);
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
r, err := guuid.Parse(GoString(in))
if err != nil {
return -1
@@ -2004,15 +2400,101 @@ func X__sincospi_stret(t *TLS, f float64) struct{ F__sinval, F__cosval float64 }
// int __srget(FILE *);
func X__srget(t *TLS, f uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v f=%v, (%v:)", t, f, origin(2))
+ }
panic(todo(""))
}
// int __svfscanf(FILE *, const char *, va_list) __scanflike(2, 0);
func X__svfscanf(t *TLS, f uintptr, p, q uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v f=%v q=%v, (%v:)", t, f, q, origin(2))
+ }
panic(todo(""))
}
// int __swbuf(int, FILE *);
func X__swbuf(t *TLS, i int32, f uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v i=%v f=%v, (%v:)", t, i, f, origin(2))
+ }
panic(todo(""))
}
+
+// int nanosleep(const struct timespec *req, struct timespec *rem);
+func Xnanosleep(t *TLS, req, rem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v rem=%v, (%v:)", t, rem, origin(2))
+ }
+ v := *(*time.Timespec)(unsafe.Pointer(req))
+ gotime.Sleep(gotime.Second*gotime.Duration(v.Ftv_sec) + gotime.Duration(v.Ftv_nsec))
+ return 0
+}
+
+// // void malloc_set_zone_name(malloc_zone_t *zone, const char *name)
+// func Xmalloc_set_zone_name(t *TLS, zone, name uintptr) {
+// if __ccgo_strace {
+// trc("t=%v zone=%v name=%v, (%v:)", t, zone, name, origin(2))
+// }
+// // nop
+// }
+
+// size_t malloc_size(const void *ptr);
+func Xmalloc_size(t *TLS, ptr uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v, (%v:)", t, ptr, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int open(const char *pathname, int flags, ...);
+func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
+ var mode types.Mode_t
+ if args != 0 {
+ mode = (types.Mode_t)(VaUint32(&args))
+ }
+ fdcwd := fcntl.AT_FDCWD
+ n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), pathname, uintptr(flags), uintptr(mode), 0, 0)
+ if err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n)
+ // }
+ return int32(n)
+}
+
+// int getrlimit(int resource, struct rlimit *rlim);
+func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// int setrlimit(int resource, const struct rlimit *rlim);
+func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
diff --git a/vendor/modernc.org/libc/libc_darwin_amd64.go b/vendor/modernc.org/libc/libc_darwin_amd64.go
index e8f46c49e..74a51ade5 100644
--- a/vendor/modernc.org/libc/libc_darwin_amd64.go
+++ b/vendor/modernc.org/libc/libc_darwin_amd64.go
@@ -11,12 +11,16 @@ import (
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/utime"
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
var kact, koldact uintptr
if act != 0 {
sz := int(unsafe.Sizeof(signal.X__sigaction{}))
@@ -44,6 +48,10 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
var err error
var p uintptr
var i int
@@ -76,6 +84,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -92,6 +103,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -108,6 +122,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstatfs(int fd, struct statfs *buf);
func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2))
+ }
if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v: %v FAIL", origin(1), fd, err)
@@ -124,6 +141,9 @@ func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
// int statfs(const char *path, struct statfs *buf);
func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v buf=%v, (%v:)", t, path, buf, origin(2))
+ }
if err := unix.Statfs(GoString(path), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -140,6 +160,9 @@ func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -156,6 +179,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -173,6 +199,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -195,6 +224,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -206,6 +238,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -226,6 +261,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -242,6 +280,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -258,6 +299,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -274,6 +318,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -296,6 +343,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -312,6 +362,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -328,6 +381,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -344,6 +400,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -355,6 +414,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
// t.setErrno(err)
@@ -366,6 +428,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -377,6 +442,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if err != 0 {
t.setErrno(err)
@@ -388,6 +456,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -412,6 +483,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -448,3 +522,10 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
panic("OOM")
}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
diff --git a/vendor/modernc.org/libc/libc_darwin_arm64.go b/vendor/modernc.org/libc/libc_darwin_arm64.go
index 3864d3117..ecb7c911d 100644
--- a/vendor/modernc.org/libc/libc_darwin_arm64.go
+++ b/vendor/modernc.org/libc/libc_darwin_arm64.go
@@ -12,12 +12,16 @@ import (
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/utime"
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
var kact, koldact uintptr
if act != 0 {
sz := int(unsafe.Sizeof(signal.X__sigaction{}))
@@ -45,6 +49,10 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
var err error
var p uintptr
var i int
@@ -77,6 +85,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -93,6 +104,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -109,6 +123,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstatfs(int fd, struct statfs *buf);
func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2))
+ }
if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v: %v FAIL", origin(1), fd, err)
@@ -125,6 +142,9 @@ func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
// int statfs(const char *path, struct statfs *buf);
func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v buf=%v, (%v:)", t, path, buf, origin(2))
+ }
if err := unix.Statfs(GoString(path), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -141,6 +161,9 @@ func Xstatfs(t *TLS, path uintptr, buf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -157,6 +180,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -174,6 +200,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -196,6 +225,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -207,6 +239,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n := time.Now().UTC().Unix()
if tloc != 0 {
*(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
@@ -226,6 +261,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -242,6 +280,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -258,6 +299,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -274,6 +318,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -296,6 +343,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -312,6 +362,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -328,6 +381,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -344,6 +400,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -355,6 +414,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
// t.setErrno(err)
@@ -366,6 +428,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -376,6 +441,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -388,6 +456,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -412,6 +483,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -448,3 +522,10 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
panic("OOM")
}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
diff --git a/vendor/modernc.org/libc/libc_freebsd.go b/vendor/modernc.org/libc/libc_freebsd.go
index 96282190c..f3c9dcc07 100644
--- a/vendor/modernc.org/libc/libc_freebsd.go
+++ b/vendor/modernc.org/libc/libc_freebsd.go
@@ -60,6 +60,9 @@ var X_ThreadRuneLocale uintptr //TODO initialize and implement _Thread_local sem
// include/xlocale/_ctype.h:54:_RuneLocale *__runes_for_locale(locale_t, int*);
func X__runes_for_locale(t *TLS, l locale_t, p uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v l=%v p=%v, (%v:)", t, l, p, origin(2))
+ }
panic(todo(""))
}
@@ -108,23 +111,35 @@ func fwrite(fd int32, b []byte) (int, error) {
// unsigned long ___runetype(__ct_rune_t) __pure;
func X___runetype(t *TLS, x types.X__ct_rune_t) ulong {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
panic(todo(""))
}
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args))
return int32(n)
}
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec types.X__useconds_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
gotime.Sleep(gotime.Microsecond * gotime.Duration(usec))
return 0
}
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
t.setErrno(err)
return -1
@@ -135,6 +150,9 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int fgetc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file)
var buf [1]byte
if n, _ := unix.Read(fd, buf[:]); n != 0 {
@@ -146,16 +164,25 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -205,11 +232,17 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
return Xopen64(t, pathname, flags, args)
}
// int open(const char *pathname, int flags, ...);
func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
@@ -232,6 +265,9 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -243,6 +279,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if noFsync {
// Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
@@ -261,6 +300,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
switch name {
case unistd.X_SC_PAGESIZE:
return long(unix.Getpagesize())
@@ -277,6 +319,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -290,6 +335,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -306,11 +354,17 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if err := unix.Ftruncate(int(fd), int64(length)); err != nil {
if dmesgs {
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
@@ -327,11 +381,17 @@ func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
// ssize_t read(int fd, void *buf, size_t count);
func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count))
if err != 0 {
t.setErrno(err)
@@ -347,6 +407,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// ssize_t write(int fd, const void *buf, size_t count);
func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
const retry = 5
var err syscall.Errno
for i := 0; i < retry; i++ {
@@ -372,6 +435,9 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -385,6 +451,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int fchown(int fd, uid_t owner, gid_t group);
func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -395,12 +464,18 @@ func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
// uid_t geteuid(void);
func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0)
return types.Uid_t(n)
}
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
t.setErrno(err)
return -1
@@ -411,6 +486,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
if tz != 0 {
panic(todo(""))
}
@@ -428,6 +506,9 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
t.setErrno(err)
return -1
@@ -438,6 +519,9 @@ func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) i
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
t.setErrno(err)
return -1
@@ -448,6 +532,9 @@ func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen so
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
var argp uintptr
if va != 0 {
argp = VaUintptr(&va)
@@ -463,6 +550,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 {
// if dmesgs {
// dmesg("%v: fd %v: %v", origin(1), sockfd, err)
@@ -476,6 +566,9 @@ func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
n, err := unix.Select(
int(nfds),
(*unix.FdSet)(unsafe.Pointer(readfds)),
@@ -493,17 +586,31 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
}
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
return types.Mode_t(n)
}
// int execvp(const char *file, char *const argv[]);
func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
t.setErrno(err)
return -1
@@ -514,6 +621,9 @@ func Xexecvp(t *TLS, file, argv uintptr) int32 {
// pid_t waitpid(pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -525,6 +635,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -541,6 +654,9 @@ func Xuname(t *TLS, buf uintptr) int32 {
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -552,6 +668,9 @@ func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -563,6 +682,9 @@ func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// int shutdown(int sockfd, int how);
func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
t.setErrno(err)
return -1
@@ -573,6 +695,9 @@ func Xshutdown(t *TLS, sockfd, how int32) int32 {
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -583,6 +708,9 @@ func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int socket(int domain, int type, int protocol);
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
if err != 0 {
t.setErrno(err)
@@ -594,6 +722,9 @@ func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
if err != 0 {
t.setErrno(err)
@@ -605,6 +736,9 @@ func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -615,6 +749,9 @@ func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int listen(int sockfd, int backlog);
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
t.setErrno(err)
return -1
@@ -625,6 +762,9 @@ func Xlisten(t *TLS, sockfd, backlog int32) int32 {
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -636,16 +776,25 @@ func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xgetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xsetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -656,16 +805,25 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// uid_t getuid(void);
func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return types.Uid_t(os.Getuid())
}
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(os.Getpid())
}
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -685,26 +843,41 @@ func Xsystem(t *TLS, command uintptr) int32 {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
// int backtrace(void **buffer, int size);
func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
panic(todo(""))
}
// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
panic(todo(""))
}
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -738,11 +911,17 @@ func (f *ftstream) close(t *TLS) {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
return Xfts64_open(t, path_argv, options, compar)
}
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
f := &ftstream{}
var walk func(string)
@@ -847,11 +1026,17 @@ func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintp
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_read(t, ftsp)
}
// FTSENT *fts_read(FTS *ftsp);
func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
t.setErrno(0)
@@ -868,11 +1053,17 @@ func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_close(t, ftsp)
}
// int fts_close(FTS *ftsp);
func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
getObject(ftsp).(*ftstream).close(t)
removeObject(ftsp)
return 0
@@ -880,6 +1071,9 @@ func Xfts64_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
@@ -887,6 +1081,9 @@ var strerrorBuf [100]byte
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
if dmesgs {
dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
}
@@ -896,31 +1093,49 @@ func Xstrerror(t *TLS, errnum int32) uintptr {
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo(""))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -928,37 +1143,58 @@ var gai_strerrorBuf [100]byte
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
return uintptr(unsafe.Pointer(&gai_strerrorBuf))
}
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
// speed_t cfgetospeed(const struct termios *termios_p);
func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
panic(todo(""))
}
// int cfsetospeed(struct termios *termios_p, speed_t speed);
func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// int cfsetispeed(struct termios *termios_p, speed_t speed);
func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
t.setErrno(errno.ENOSYS)
return -1
}
@@ -967,21 +1203,33 @@ var emptyStr = [1]byte{}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// char *nl_langinfo(nl_item item);
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1008,21 +1256,25 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
return resolved_path
}
-// struct tm *gmtime_r(const time_t *timep, struct tm *result);
-func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
- panic(todo(""))
-}
-
// char *inet_ntoa(struct in_addr in);
func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uintptr(unsafe.Pointer(&in6_addr_any))
}
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
if dmesgs {
dmesg("%v:", origin(1))
}
@@ -1040,11 +1292,17 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return 0 //TODO
}
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_READ, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1060,6 +1318,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1075,11 +1336,17 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return file(stream).close(t)
}
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -1089,6 +1356,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
@@ -1105,6 +1375,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
if n < 0 {
file(stream).setErr()
@@ -1119,21 +1392,33 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Bool32(file(stream).err())
}
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
panic(todo(""))
}
// int fscanf(FILE *stream, const char *format, ...);
func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
panic(todo(""))
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
return -1
}
@@ -1145,6 +1430,9 @@ var getservbynameStaticResult netdb.Servent
// struct servent *getservbyname(const char *name, const char *proto);
func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
var protoent *gonetdb.Protoent
if proto != 0 {
protoent = gonetdb.GetProtoByName(GoString(proto))
@@ -1222,6 +1510,9 @@ func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
}
func Xreaddir64(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
return Xreaddir(t, dir)
}
@@ -1234,14 +1525,23 @@ func __syscall(r, _ uintptr, errno syscall.Errno) long {
}
func X__syscall1(t *TLS, trap, p1 long) long {
+ if __ccgo_strace {
+ trc("t=%v p1=%v, (%v:)", t, p1, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0))
}
func X__syscall3(t *TLS, trap, p1, p2, p3 long) long {
+ if __ccgo_strace {
+ trc("t=%v p3=%v, (%v:)", t, p3, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3)))
}
func X__syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
+ if __ccgo_strace {
+ trc("t=%v p4=%v, (%v:)", t, p4, origin(2))
+ }
return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0))
}
@@ -1264,26 +1564,41 @@ func fcntlCmdStr(cmd int32) string {
// int setenv(const char *name, const char *value, int overwrite);
func Xsetenv(t *TLS, name, value uintptr, overwrite int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v value=%v overwrite=%v, (%v:)", t, value, overwrite, origin(2))
+ }
panic(todo(""))
}
// int unsetenv(const char *name);
func Xunsetenv(t *TLS, name uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
panic(todo(""))
}
// int pause(void);
func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
panic(todo(""))
}
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := Xsscanf(t, str, format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1293,16 +1608,25 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// void __assert(const char * func, const char * file, int line, const char *expr) __dead2;
func X__assert(t *TLS, fn, file uintptr, line int32, expr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v expr=%v, (%v:)", t, file, line, expr, origin(2))
+ }
X__assert_fail(t, expr, file, uint32(line), fn)
}
// include/stdio.h:456:int __swbuf(int, FILE *);
func X__swbuf(t *TLS, n int32, file uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v file=%v, (%v:)", t, n, file, origin(2))
+ }
return Xfputc(t, n, file) //TODO improve performance, use a real buffer.
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1319,6 +1643,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// struct dirent *readdir(DIR *dirp);
func Xreaddir(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
if (*darwinDir)(unsafe.Pointer(dir)).eof {
return 0
}
@@ -1357,6 +1684,9 @@ type darwinDir struct {
// int sscanf(const char *str, const char *format, ...);
func Xsscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1366,10 +1696,16 @@ func Xsscanf(t *TLS, str, format, va uintptr) int32 {
// int * __error(void);
func X__error(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
func Xclosedir(t *TLS, dir uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
r := Xclose(t, int32((*darwinDir)(unsafe.Pointer(dir)).fd))
Xfree(t, dir)
return r
@@ -1377,11 +1713,17 @@ func Xclosedir(t *TLS, dir uintptr) int32 {
// int __xuname(int namesize, void *namebuf)
func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v namesize=%v namebuf=%v, (%v:)", t, namesize, namebuf, origin(2))
+ }
return Xuname(t, namebuf)
}
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
var a [2]int
if err := syscall.Pipe(a[:]); err != nil {
if dmesgs {
@@ -1400,10 +1742,16 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// char *inet_ntoa(struct in_addr in);
func X__inet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
// Cannot avoid the syscall here, addr sometimes matter.
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
@@ -1423,18 +1771,30 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return (*(*int32)(unsafe.Pointer((m /* &.__u */ /* &.__i */))) & 15)
}
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
}
func Xpthread_attr_init(t *TLS, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
*(*pthread.Pthread_attr_t)(unsafe.Pointer(pAttr)) = pthread.Pthread_attr_t(0)
return 0
}
@@ -1451,6 +1811,9 @@ func Xpthread_attr_init(t *TLS, pAttr uintptr) int32 {
//
// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr);
func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
typ := PTHREAD_MUTEX_DEFAULT
if pAttr != 0 {
typ = int(X__ccgo_pthreadMutexattrGettype(t, pAttr))
@@ -1464,11 +1827,17 @@ func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 {
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
return 0
}
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -1477,15 +1846,24 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
@@ -1495,6 +1873,9 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth
// int uuid_parse( char *in, uuid_t uu);
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
r, err := guuid.Parse(GoString(in))
if err != nil {
return -1
@@ -1504,27 +1885,87 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
return 0
}
-func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) }
+func X__srget(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return Xgetc(t, stream)
+}
func X___tolower(t *TLS, r rune) rune {
+ if __ccgo_strace {
+ trc("t=%v r=%v, (%v:)", t, r, origin(2))
+ }
return unicode.ToLower(r)
}
func X___toupper(t *TLS, r rune) rune {
+ if __ccgo_strace {
+ trc("t=%v r=%v, (%v:)", t, r, origin(2))
+ }
return unicode.ToLower(r)
}
// uint16_t __builtin_bswap16 (uint32_t x)
func Xbswap16(t *TLS, x uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap16(t, x)
}
// uint32_t __builtin_bswap32 (uint32_t x)
func Xbswap32(t *TLS, x uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap32(t, x)
}
// uint64_t __builtin_bswap64 (uint64_t x)
func Xbswap64(t *TLS, x uint64) uint64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap64(t, x)
}
+
+// int nanosleep(const struct timespec *req, struct timespec *rem);
+func Xnanosleep(t *TLS, req, rem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v rem=%v, (%v:)", t, rem, origin(2))
+ }
+ v := *(*time.Timespec)(unsafe.Pointer(req))
+ gotime.Sleep(gotime.Second*gotime.Duration(v.Ftv_sec) + gotime.Duration(v.Ftv_nsec))
+ return 0
+}
+
+// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
+func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
+ var n int
+ var err error
+ switch {
+ case count == 0:
+ n, err = unix.Pwrite(int(fd), nil, int64(offset))
+ default:
+ n, err = unix.Pwrite(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, count %#x\n%s", origin(1), fd, offset, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
+ // }
+ }
+ 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.Ssize_t(n)
+}
diff --git a/vendor/modernc.org/libc/libc_freebsd_386.go b/vendor/modernc.org/libc/libc_freebsd_386.go
index 294448774..1fee674ca 100644
--- a/vendor/modernc.org/libc/libc_freebsd_386.go
+++ b/vendor/modernc.org/libc/libc_freebsd_386.go
@@ -24,6 +24,9 @@ type (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
t.setErrno(err)
return -1
@@ -34,6 +37,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -73,6 +79,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -89,6 +98,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -105,6 +117,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -121,6 +136,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -137,6 +155,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -153,6 +174,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -177,6 +201,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -193,6 +220,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -209,6 +239,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -219,6 +252,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -241,6 +277,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -257,6 +296,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -273,6 +315,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -294,6 +339,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -310,6 +358,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -321,6 +372,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -343,6 +397,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -353,6 +410,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +424,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -376,6 +439,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -386,6 +452,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -485,6 +554,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -572,6 +644,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -606,6 +681,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -632,6 +710,9 @@ func Xopendir(t *TLS, name uintptr) uintptr {
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
diff --git a/vendor/modernc.org/libc/libc_freebsd_amd64.go b/vendor/modernc.org/libc/libc_freebsd_amd64.go
index 48f7fd786..c02e503c1 100644
--- a/vendor/modernc.org/libc/libc_freebsd_amd64.go
+++ b/vendor/modernc.org/libc/libc_freebsd_amd64.go
@@ -7,11 +7,13 @@ package libc // import "modernc.org/libc"
import (
"strings"
"syscall"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/fts"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/utime"
@@ -22,8 +24,15 @@ type (
ulong = uint64
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
t.setErrno(err)
return -1
@@ -34,6 +43,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -73,6 +85,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -89,6 +104,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -105,6 +123,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -121,6 +142,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -137,6 +161,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -153,6 +180,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -177,6 +207,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -193,6 +226,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -209,6 +245,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -219,6 +258,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -241,6 +283,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -257,6 +302,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -273,6 +321,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -294,6 +345,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -310,6 +364,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -321,6 +378,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -343,6 +403,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -353,6 +416,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +430,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -376,6 +445,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -386,6 +458,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -485,6 +560,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -572,6 +650,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -606,6 +687,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -632,6 +716,9 @@ func Xopendir(t *TLS, name uintptr) uintptr {
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -645,3 +732,168 @@ func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
}
return 0
}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_freebsd_arm.go b/vendor/modernc.org/libc/libc_freebsd_arm.go
index 294448774..1fee674ca 100644
--- a/vendor/modernc.org/libc/libc_freebsd_arm.go
+++ b/vendor/modernc.org/libc/libc_freebsd_arm.go
@@ -24,6 +24,9 @@ type (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
t.setErrno(err)
return -1
@@ -34,6 +37,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -73,6 +79,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -89,6 +98,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -105,6 +117,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -121,6 +136,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -137,6 +155,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -153,6 +174,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -177,6 +201,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -193,6 +220,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -209,6 +239,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -219,6 +252,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -241,6 +277,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -257,6 +296,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -273,6 +315,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -294,6 +339,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -310,6 +358,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -321,6 +372,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -343,6 +397,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -353,6 +410,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +424,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -376,6 +439,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -386,6 +452,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -485,6 +554,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -572,6 +644,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -606,6 +681,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -632,6 +710,9 @@ func Xopendir(t *TLS, name uintptr) uintptr {
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
diff --git a/vendor/modernc.org/libc/libc_freebsd_arm64.go b/vendor/modernc.org/libc/libc_freebsd_arm64.go
index 48f7fd786..c02e503c1 100644
--- a/vendor/modernc.org/libc/libc_freebsd_arm64.go
+++ b/vendor/modernc.org/libc/libc_freebsd_arm64.go
@@ -7,11 +7,13 @@ package libc // import "modernc.org/libc"
import (
"strings"
"syscall"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/fts"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/utime"
@@ -22,8 +24,15 @@ type (
ulong = uint64
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
t.setErrno(err)
return -1
@@ -34,6 +43,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -73,6 +85,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -89,6 +104,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -105,6 +123,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -121,6 +142,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -137,6 +161,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -153,6 +180,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -177,6 +207,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -193,6 +226,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -209,6 +245,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -219,6 +258,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -241,6 +283,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -257,6 +302,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -273,6 +321,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -294,6 +345,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -310,6 +364,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -321,6 +378,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -343,6 +403,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -353,6 +416,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +430,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -376,6 +445,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -386,6 +458,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -485,6 +560,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -572,6 +650,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -606,6 +687,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -632,6 +716,9 @@ func Xopendir(t *TLS, name uintptr) uintptr {
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -645,3 +732,168 @@ func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
}
return 0
}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_illumos.go b/vendor/modernc.org/libc/libc_illumos.go
new file mode 100644
index 000000000..5224f4722
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_illumos.go
@@ -0,0 +1,2096 @@
+// 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 libc // import "modernc.org/libc"
+
+import (
+ // "encoding/hex"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "runtime"
+ // "runtime/debug"
+ "syscall"
+ "time"
+ "unsafe"
+
+ guuid "github.com/google/uuid"
+ "golang.org/x/sys/unix"
+ "modernc.org/libc/errno"
+ "modernc.org/libc/fcntl"
+ "modernc.org/libc/fts"
+ gonetdb "modernc.org/libc/honnef.co/go/netdb"
+ "modernc.org/libc/langinfo"
+ "modernc.org/libc/limits"
+ "modernc.org/libc/netdb"
+ "modernc.org/libc/netinet/in"
+ // "modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
+ "modernc.org/libc/sys/socket"
+ "modernc.org/libc/sys/stat"
+ "modernc.org/libc/sys/types"
+ "modernc.org/libc/termios"
+ ctime "modernc.org/libc/time"
+ "modernc.org/libc/unistd"
+ "modernc.org/libc/uuid/uuid"
+)
+
+const (
+ // musl/src/internal/stdio_impl.h:16:#define F_EOF 16
+ m_F_EOF = 16
+)
+
+var (
+ in6_addr_any in.In6_addr
+ _ = X__ctype_b_loc
+)
+
+type (
+ long = int
+ ulong = uint
+)
+
+type file uintptr
+
+func (f file) fd() int32 {
+ panic(todo(""))
+ // return (*stdio.FILE)(unsafe.Pointer(f)).F_fileno
+}
+func (f file) setFd(fd int32) {
+ panic(todo(""))
+ // (*stdio.FILE)(unsafe.Pointer(f)).F_fileno = fd
+}
+func (f file) err() bool {
+ panic(todo(""))
+ // return (*stdio.FILE)(unsafe.Pointer(f)).F_flags2&stdio.X_IO_ERR_SEEN != 0
+}
+func (f file) setErr() {
+ panic(todo(""))
+ // (*stdio.FILE)(unsafe.Pointer(f)).F_flags2 |= stdio.X_IO_ERR_SEEN
+}
+func (f file) flags() int32 {
+ panic(todo(""))
+ // return (*stdio.FILE)(unsafe.Pointer(f)).F_flags
+}
+func (f file) orFlags(n int32) {
+ panic(todo(""))
+ // (*stdio.FILE)(unsafe.Pointer(f)).F_flags |= n
+}
+func (f file) xorFlags(n int32) {
+ panic(todo(""))
+ // (*stdio.FILE)(unsafe.Pointer(f)).F_flags ^= n
+}
+
+func (f file) close(t *TLS) int32 {
+ r := Xclose(t, f.fd())
+ Xfree(t, uintptr(f))
+ if r < 0 {
+ return stdio.EOF
+ }
+ return 0
+}
+
+func newFile(t *TLS, fd int32) uintptr {
+ p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(stdio.FILE{})))
+ if p == 0 {
+ return 0
+ }
+
+ file(p).setFd(fd)
+ return p
+}
+
+func fwrite(fd int32, b []byte) (int, error) {
+ if fd == unistd.STDOUT_FILENO {
+ return write(b)
+ }
+
+ // if dmesgs {
+ // dmesg("%v: fd %v: %s", origin(1), fd, b)
+ // }
+ return unix.Write(int(fd), b) //TODO use Xwrite
+}
+
+// int fprintf(FILE *stream, const char *format, ...);
+func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
+ panic(todo(""))
+ // n, _ := fwrite((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno, printf(format, args))
+ // return int32(n)
+}
+
+// int usleep(useconds_t usec);
+func Xusleep(t *TLS, usec uint) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
+ panic(todo(""))
+ // time.Sleep(time.Microsecond * time.Duration(usec))
+ // return 0
+}
+
+// int getrusage(int who, struct rusage *usage);
+func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int lstat(const char *pathname, struct stat *statbuf);
+func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ return Xlstat64(t, pathname, statbuf)
+}
+
+// int stat(const char *pathname, struct stat *statbuf);
+func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ return Xstat64(t, pathname, statbuf)
+}
+
+// int chdir(const char *path);
+func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(path))
+ // // }
+ // return 0
+}
+
+var localtime ctime.Tm
+
+// struct tm *localtime(const time_t *timep);
+func Xlocaltime(_ *TLS, timep uintptr) uintptr {
+ panic(todo(""))
+ // loc := getLocalLocation()
+ // ut := *(*unix.Time_t)(unsafe.Pointer(timep))
+ // t := time.Unix(int64(ut), 0).In(loc)
+ // localtime.Ftm_sec = int32(t.Second())
+ // localtime.Ftm_min = int32(t.Minute())
+ // localtime.Ftm_hour = int32(t.Hour())
+ // localtime.Ftm_mday = int32(t.Day())
+ // localtime.Ftm_mon = int32(t.Month() - 1)
+ // localtime.Ftm_year = int32(t.Year() - 1900)
+ // localtime.Ftm_wday = int32(t.Weekday())
+ // localtime.Ftm_yday = int32(t.YearDay())
+ // localtime.Ftm_isdst = Bool32(isTimeDST(t))
+ // return uintptr(unsafe.Pointer(&localtime))
+}
+
+// struct tm *localtime_r(const time_t *timep, struct tm *result);
+func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
+ panic(todo(""))
+ // loc := getLocalLocation()
+ // ut := *(*unix.Time_t)(unsafe.Pointer(timep))
+ // t := time.Unix(int64(ut), 0).In(loc)
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_min = int32(t.Minute())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_hour = int32(t.Hour())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_mday = int32(t.Day())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_mon = int32(t.Month() - 1)
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_year = int32(t.Year() - 1900)
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_wday = int32(t.Weekday())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_yday = int32(t.YearDay())
+ // (*ctime.Tm)(unsafe.Pointer(result)).Ftm_isdst = Bool32(isTimeDST(t))
+ // return result
+}
+
+// int open(const char *pathname, int flags, ...);
+func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
+ return Xopen64(t, pathname, flags, args)
+}
+
+// int open(const char *pathname, int flags, ...);
+func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
+ panic(todo(""))
+ // //TODO- flags |= fcntl.O_LARGEFILE
+ // var mode types.Mode_t
+ // if args != 0 {
+ // mode = (types.Mode_t)(VaUint32(&args))
+ // }
+ // fdcwd := fcntl.AT_FDCWD
+ // n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), pathname, uintptr(flags|unix.O_LARGEFILE), uintptr(mode), 0, 0)
+ // if err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %q %#x: %v", origin(1), GoString(pathname), flags, err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %q flags %#x mode %#o: fd %v", origin(1), GoString(pathname), flags, mode, n)
+ // // }
+ // return int32(n)
+}
+
+// int openat(int dirfd, const char *pathname, int flags, mode_t mode);
+func Xopenat(t *TLS, dirfd int32, pathname uintptr, flags int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v mode=%v, (%v:)", t, dirfd, pathname, flags, mode, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // fd, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(dirfd), pathname, uintptr(flags), uintptr(mode), 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return int32(fd)
+}
+
+// off_t lseek(int fd, off_t offset, int whence);
+func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
+ return types.Off_t(Xlseek64(t, fd, offset, whence))
+}
+
+func whenceStr(whence int32) string {
+ panic(todo(""))
+ // switch whence {
+ // case fcntl.SEEK_CUR:
+ //
+ // return "SEEK_CUR"
+ //
+ // case fcntl.SEEK_END:
+ //
+ // return "SEEK_END"
+ //
+ // case fcntl.SEEK_SET:
+ //
+ // return "SEEK_SET"
+ //
+ // default:
+ //
+ // return fmt.Sprintf("whence(%d)", whence)
+ // }
+}
+
+var fsyncStatbuf stat.Stat
+
+// int fsync(int fd);
+func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
+ if noFsync {
+ // Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
+ return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
+ }
+
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_FSYNC, uintptr(fd), 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %d: ok", origin(1), fd)
+ // // }
+ // return 0
+}
+
+// long sysconf(int name);
+func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
+ switch name {
+ case unistd.X_SC_PAGESIZE:
+ return long(unix.Getpagesize())
+ case unistd.X_SC_GETPW_R_SIZE_MAX:
+ 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))
+}
+
+// int close(int fd);
+func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %d: ok", origin(1), fd)
+ // // }
+ // return 0
+}
+
+// char *getcwd(char *buf, size_t size);
+func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_GETCWD, buf, uintptr(size), 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return 0
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(buf))
+ // // }
+ // return n
+}
+
+// int fstat(int fd, struct stat *statbuf);
+func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
+ return Xfstat64(t, fd, statbuf)
+}
+
+// int ftruncate(int fd, off_t length);
+func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
+ return Xftruncate64(t, fd, length)
+}
+
+// int fcntl(int fd, int cmd, ... /* arg */ );
+func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
+ return Xfcntl64(t, fd, cmd, args)
+}
+
+// ssize_t read(int fd, void *buf, size_t count);
+func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count))
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n))))
+ // // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n)
+ // // }
+ // return types.Ssize_t(n)
+}
+
+// ssize_t write(int fd, const void *buf, size_t count);
+func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
+ panic(todo(""))
+ // const retry = 5
+ // var err syscall.Errno
+ // for i := 0; i < retry; i++ {
+ // var n uintptr
+ // switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err {
+ // case 0:
+ // // if dmesgs {
+ // // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n))))
+ // // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n)
+ // // }
+ // return types.Ssize_t(n)
+ // case errno.EAGAIN:
+ // // nop
+ // }
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+}
+
+// int fchmod(int fd, mode_t mode);
+func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: %d %#o: ok", origin(1), fd, mode)
+ // // }
+ // return 0
+}
+
+// int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags);
+func Xfchmodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v flags=%v, (%v:)", t, dirfd, pathname, mode, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/syscall_linux.go
+ // // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior
+ // // and check the flags. Otherwise the mode would be applied to the symlink
+ // // destination which is not what the user expects.
+ // if flags&^unix.AT_SYMLINK_NOFOLLOW != 0 {
+ // t.setErrno(unix.EINVAL)
+ // return -1
+ // } else if flags&unix.AT_SYMLINK_NOFOLLOW != 0 {
+ // t.setErrno(unix.EOPNOTSUPP)
+ // return -1
+ // }
+
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall(unix.SYS_FCHMODAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int fchown(int fd, uid_t owner, gid_t group);
+func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// uid_t geteuid(void);
+func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ panic(todo(""))
+ // n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0)
+ // return types.Uid_t(n)
+}
+
+// int munmap(void *addr, size_t length);
+func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int gettimeofday(struct timeval *tv, struct timezone *tz);
+func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
+ if tz != 0 {
+ panic(todo(""))
+ }
+
+ var tvs unix.Timeval
+ err := unix.Gettimeofday(&tvs)
+ if err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ *(*unix.Timeval)(unsafe.Pointer(tv)) = tvs
+ return 0
+}
+
+// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
+func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
+func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int ioctl(int fd, unsigned long request, ...);
+func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
+ panic(todo(""))
+ // var argp uintptr
+ // if va != 0 {
+ // argp = VaUintptr(&va)
+ // }
+ // n, _, err := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(request), argp)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return int32(n)
+}
+
+// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: fd %v: %v", origin(1), sockfd, err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
+func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
+ n, err := unix.Select(
+ int(nfds),
+ (*unix.FdSet)(unsafe.Pointer(readfds)),
+ (*unix.FdSet)(unsafe.Pointer(writefds)),
+ (*unix.FdSet)(unsafe.Pointer(exceptfds)),
+ (*unix.Timeval)(unsafe.Pointer(timeout)),
+ )
+ if err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ return int32(n)
+}
+
+// int mkfifo(const char *pathname, mode_t mode);
+func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if err := unix.Mkfifo(GoString(pathname), mode); err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// mode_t umask(mode_t mask);
+func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
+ panic(todo(""))
+ // n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
+ // return types.Mode_t(n)
+}
+
+// int execvp(const char *file, char *const argv[]);
+func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// pid_t waitpid(pid_t pid, int *wstatus, int options);
+func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return types.Pid_t(n)
+}
+
+// int uname(struct utsname *buf);
+func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_UNAME, buf, 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
+func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return types.Ssize_t(n)
+}
+
+// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
+func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return types.Ssize_t(n)
+}
+
+// int shutdown(int sockfd, int how);
+func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int socket(int domain, int type, int protocol);
+func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return int32(n)
+}
+
+// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return int32(n)
+}
+
+// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int listen(int sockfd, int backlog);
+func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return int32(n)
+}
+
+// int getrlimit(int resource, struct rlimit *rlim);
+func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ return Xgetrlimit64(t, resource, rlim)
+}
+
+// int setrlimit(int resource, const struct rlimit *rlim);
+func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ return Xsetrlimit64(t, resource, rlim)
+}
+
+// uid_t getuid(void);
+func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return types.Uid_t(os.Getuid())
+}
+
+// pid_t getpid(void);
+func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return int32(os.Getpid())
+}
+
+// int system(const char *command);
+func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
+ s := GoString(command)
+ if command == 0 {
+ panic(todo(""))
+ }
+
+ cmd := exec.Command("sh", "-c", s)
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ err := cmd.Run()
+ if err != nil {
+ ps := err.(*exec.ExitError)
+ return int32(ps.ExitCode())
+ }
+
+ return 0
+}
+
+// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
+func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
+ return 0 //TODO
+}
+
+// int raise(int sig);
+func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int backtrace(void **buffer, int size);
+func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
+ panic(todo(""))
+}
+
+// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
+func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int fileno(FILE *stream);
+func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ panic(todo(""))
+ // if stream == 0 {
+ // t.setErrno(errno.EBADF)
+ // return -1
+ // }
+ //
+ // if fd := (*stdio.FILE)(unsafe.Pointer(stream)).F_fileno; fd >= 0 {
+ // return fd
+ // }
+ //
+ // t.setErrno(errno.EBADF)
+ // return -1
+}
+
+func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
+ panic(todo(""))
+ // 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: uint16(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 {
+ panic("OOM")
+ }
+
+ *(*fts.FTSENT)(unsafe.Pointer(p)) = *newFtsent(t, info, path, stat, err)
+ return p
+}
+
+func ftsentClose(t *TLS, p uintptr) {
+ Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_path)
+ Xfree(t, (*fts.FTSENT)(unsafe.Pointer(p)).Ffts_statp)
+}
+
+type ftstream struct {
+ s []uintptr
+ x int
+}
+
+func (f *ftstream) close(t *TLS) {
+ for _, p := range f.s {
+ ftsentClose(t, p)
+ Xfree(t, p)
+ }
+ *f = ftstream{}
+}
+
+// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
+func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
+ return Xfts64_open(t, path_argv, options, compar)
+}
+
+// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
+func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
+ f := &ftstream{}
+
+ var walk func(string)
+ walk = func(path string) {
+ var fi os.FileInfo
+ var err error
+ switch {
+ case options&fts.FTS_LOGICAL != 0:
+ fi, err = os.Stat(path)
+ case options&fts.FTS_PHYSICAL != 0:
+ fi, err = os.Lstat(path)
+ default:
+ panic(todo(""))
+ }
+
+ if err != nil {
+ return
+ }
+
+ var statp *unix.Stat_t
+ if options&fts.FTS_NOSTAT == 0 {
+ var stat unix.Stat_t
+ switch {
+ case options&fts.FTS_LOGICAL != 0:
+ if err := unix.Stat(path, &stat); err != nil {
+ panic(todo(""))
+ }
+ case options&fts.FTS_PHYSICAL != 0:
+ if err := unix.Lstat(path, &stat); err != nil {
+ panic(todo(""))
+ }
+ default:
+ panic(todo(""))
+ }
+
+ statp = &stat
+ }
+
+ out:
+ switch {
+ case fi.IsDir():
+ f.s = append(f.s, newCFtsent(t, fts.FTS_D, path, statp, 0))
+ g, err := os.Open(path)
+ switch x := err.(type) {
+ case nil:
+ // ok
+ case *os.PathError:
+ f.s = append(f.s, newCFtsent(t, fts.FTS_DNR, path, statp, errno.EACCES))
+ break out
+ default:
+ panic(todo("%q: %v %T", path, x, x))
+ }
+
+ names, err := g.Readdirnames(-1)
+ g.Close()
+ if err != nil {
+ panic(todo(""))
+ }
+
+ for _, name := range names {
+ walk(path + "/" + name)
+ if f == nil {
+ break out
+ }
+ }
+
+ f.s = append(f.s, newCFtsent(t, fts.FTS_DP, path, statp, 0))
+ default:
+ info := fts.FTS_F
+ if fi.Mode()&os.ModeSymlink != 0 {
+ info = fts.FTS_SL
+ }
+ switch {
+ case statp != nil:
+ f.s = append(f.s, newCFtsent(t, info, path, statp, 0))
+ case options&fts.FTS_NOSTAT != 0:
+ f.s = append(f.s, newCFtsent(t, fts.FTS_NSOK, path, nil, 0))
+ default:
+ panic(todo(""))
+ }
+ }
+ }
+
+ for {
+ p := *(*uintptr)(unsafe.Pointer(path_argv))
+ if p == 0 {
+ if f == nil {
+ return 0
+ }
+
+ if compar != 0 {
+ panic(todo(""))
+ }
+
+ return addObject(f)
+ }
+
+ walk(GoString(p))
+ path_argv += unsafe.Sizeof(uintptr(0))
+ }
+}
+
+// FTSENT *fts_read(FTS *ftsp);
+func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
+ return Xfts64_read(t, ftsp)
+}
+
+// FTSENT *fts_read(FTS *ftsp);
+func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
+ f := getObject(ftsp).(*ftstream)
+ if f.x == len(f.s) {
+ t.setErrno(0)
+ return 0
+ }
+
+ r := f.s[f.x]
+ if e := (*fts.FTSENT)(unsafe.Pointer(r)).Ffts_errno; e != 0 {
+ t.setErrno(e)
+ }
+ f.x++
+ return r
+}
+
+// int fts_close(FTS *ftsp);
+func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
+ return Xfts64_close(t, ftsp)
+}
+
+// int fts_close(FTS *ftsp);
+func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
+ getObject(ftsp).(*ftstream).close(t)
+ removeObject(ftsp)
+ return 0
+}
+
+// void tzset (void);
+func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ //TODO
+}
+
+var strerrorBuf [100]byte
+
+// char *strerror(int errnum);
+func Xstrerror(t *TLS, errnum int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
+ // if dmesgs {
+ // dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
+ // }
+ copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum))
+ return uintptr(unsafe.Pointer(&strerrorBuf[0]))
+}
+
+// void *dlopen(const char *filename, int flags);
+func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
+ panic(todo("%q", GoString(filename)))
+}
+
+// char *dlerror(void);
+func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int dlclose(void *handle);
+func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
+ panic(todo(""))
+}
+
+// void *dlsym(void *handle, const char *symbol);
+func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
+ panic(todo(""))
+}
+
+// void perror(const char *s);
+func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int pclose(FILE *stream);
+func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ panic(todo(""))
+}
+
+var gai_strerrorBuf [100]byte
+
+// const char *gai_strerror(int errcode);
+func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
+ copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
+ return uintptr(unsafe.Pointer(&gai_strerrorBuf))
+}
+
+// int tcgetattr(int fd, struct termios *termios_p);
+func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
+func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
+ panic(todo(""))
+}
+
+// speed_t cfgetospeed(const struct termios *termios_p);
+func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int cfsetospeed(struct termios *termios_p, speed_t speed);
+func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int cfsetispeed(struct termios *termios_p, speed_t speed);
+func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
+ panic(todo(""))
+}
+
+// pid_t fork(void);
+func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ t.setErrno(errno.ENOSYS)
+ return -1
+}
+
+var emptyStr = [1]byte{}
+
+// char *setlocale(int category, const char *locale);
+func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&emptyStr)) //TODO
+}
+
+// char *nl_langinfo(nl_item item);
+func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&emptyStr)) //TODO
+}
+
+// FILE *popen(const char *command, const char *type);
+func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
+ panic(todo(""))
+}
+
+// char *realpath(const char *path, char *resolved_path);
+func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
+ s, err := filepath.EvalSymlinks(GoString(path))
+ if err != nil {
+ if os.IsNotExist(err) {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(path), err)
+ // }
+ t.setErrno(errno.ENOENT)
+ return 0
+ }
+
+ panic(todo("", err))
+ }
+
+ if resolved_path == 0 {
+ panic(todo(""))
+ }
+
+ if len(s) >= limits.PATH_MAX {
+ s = s[:limits.PATH_MAX-1]
+ }
+
+ copy((*RawMem)(unsafe.Pointer(resolved_path))[:len(s):len(s)], s)
+ (*RawMem)(unsafe.Pointer(resolved_path))[len(s)] = 0
+ return resolved_path
+}
+
+// char *inet_ntoa(struct in_addr in);
+func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
+ panic(todo(""))
+}
+
+func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&in6_addr_any))
+}
+
+func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ panic(todo(""))
+ // // if dmesgs {
+ // // dmesg("%v:\n%s", origin(1), debug.Stack())
+ // // }
+ // p := Xmalloc(t, types.Size_t(unsafe.Sizeof(signal.Sigaction{})))
+ // if p == 0 {
+ // panic("OOM")
+ // }
+ //
+ // *(*signal.Sigaction)(unsafe.Pointer(p)) = signal.Sigaction{
+ // F__sigaction_handler: struct{ Fsa_handler signal.X__sighandler_t }{Fsa_handler: signal.SIG_DFL},
+ // }
+ // Xsigaction(t, signal.SIGABRT, p, 0)
+ // Xfree(t, p)
+ // unix.Kill(unix.Getpid(), syscall.Signal(signal.SIGABRT))
+ // panic(todo("unrechable"))
+}
+
+// int fflush(FILE *stream);
+func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return 0 //TODO
+}
+
+// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
+func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
+ panic(todo(""))
+ // m, _, err := unix.Syscall(unix.SYS_READ, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
+ // if m == 0 {
+ // file(stream).orFlags(m_F_EOF)
+ // }
+ // if err != 0 {
+ // file(stream).setErr()
+ // return 0
+ // }
+
+ // // if dmesgs {
+ // // // dmesg("%v: %d %#x x %#x: %#x\n%s", origin(1), file(stream).fd(), size, nmemb, types.Size_t(m)/size, hex.Dump(GoBytes(ptr, int(m))))
+ // // dmesg("%v: %d %#x x %#x: %#x", origin(1), file(stream).fd(), size, nmemb, types.Size_t(m)/size)
+ // // }
+ // return types.Size_t(m) / size
+}
+
+// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
+func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
+ panic(todo(""))
+ // m, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
+ // if err != 0 {
+ // file(stream).setErr()
+ // return 0
+ // }
+
+ // // if dmesgs {
+ // // // dmesg("%v: %d %#x x %#x: %#x\n%s", origin(1), file(stream).fd(), size, nmemb, types.Size_t(m)/size, hex.Dump(GoBytes(ptr, int(m))))
+ // // dmesg("%v: %d %#x x %#x: %#x", origin(1), file(stream).fd(), size, nmemb, types.Size_t(m)/size)
+ // // }
+ // return types.Size_t(m) / size
+}
+
+// int fclose(FILE *stream);
+func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return file(stream).close(t)
+}
+
+// int fputc(int c, FILE *stream);
+func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
+ if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
+ return stdio.EOF
+ }
+
+ return int32(byte(c))
+}
+
+// int fseek(FILE *stream, long offset, int whence);
+func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
+ if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
+ // }
+ file(stream).setErr()
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: ok", origin(1), file(stream).fd(), offset, whenceStr(whence))
+ // }
+ file(stream).xorFlags(m_F_EOF)
+ return 0
+}
+
+// long ftell(FILE *stream);
+func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
+ if n < 0 {
+ file(stream).setErr()
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: fd %v, n %#x: ok %#x", origin(1), file(stream).fd(), n, long(n))
+ // }
+ return long(n)
+}
+
+// int ferror(FILE *stream);
+func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return Bool32(file(stream).err())
+}
+
+// int ungetc(int c, FILE *stream);
+func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
+ if c == stdio.EOF {
+ return c
+ }
+
+ ungetcMu.Lock()
+ ungetc[stream] = byte(c)
+ ungetcMu.Unlock()
+ return int32(byte(c))
+}
+
+// int fscanf(FILE *stream, const char *format, ...);
+func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
+ return scanf(&byteScanner{t: t, stream: stream}, format, va)
+}
+
+// int fputs(const char *s, FILE *stream);
+func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
+ // return -1
+ // }
+
+ // return 0
+}
+
+var getservbynameStaticResult netdb.Servent
+
+// struct servent *getservbyname(const char *name, const char *proto);
+func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
+ var protoent *gonetdb.Protoent
+ if proto != 0 {
+ protoent = gonetdb.GetProtoByName(GoString(proto))
+ }
+ servent := gonetdb.GetServByName(GoString(name), protoent)
+ if servent == nil {
+ // if dmesgs {
+ // dmesg("%q %q: nil (protoent %+v)", GoString(name), GoString(proto), protoent)
+ // }
+ return 0
+ }
+
+ Xfree(t, (*netdb.Servent)(unsafe.Pointer(&getservbynameStaticResult)).Fs_name)
+ if v := (*netdb.Servent)(unsafe.Pointer(&getservbynameStaticResult)).Fs_aliases; v != 0 {
+ for {
+ p := *(*uintptr)(unsafe.Pointer(v))
+ if p == 0 {
+ break
+ }
+
+ Xfree(t, p)
+ v += unsafe.Sizeof(uintptr(0))
+ }
+ Xfree(t, v)
+ }
+ Xfree(t, (*netdb.Servent)(unsafe.Pointer(&getservbynameStaticResult)).Fs_proto)
+ cname, err := CString(servent.Name)
+ if err != nil {
+ getservbynameStaticResult = netdb.Servent{}
+ return 0
+ }
+
+ var protoname uintptr
+ if protoent != nil {
+ if protoname, err = CString(protoent.Name); err != nil {
+ Xfree(t, cname)
+ getservbynameStaticResult = netdb.Servent{}
+ return 0
+ }
+ }
+ var a []uintptr
+ for _, v := range servent.Aliases {
+ cs, err := CString(v)
+ if err != nil {
+ for _, v := range a {
+ Xfree(t, v)
+ }
+ return 0
+ }
+
+ a = append(a, cs)
+ }
+ v := Xcalloc(t, types.Size_t(len(a)+1), types.Size_t(unsafe.Sizeof(uintptr(0))))
+ if v == 0 {
+ Xfree(t, cname)
+ Xfree(t, protoname)
+ for _, v := range a {
+ Xfree(t, v)
+ }
+ getservbynameStaticResult = netdb.Servent{}
+ return 0
+ }
+ for _, p := range a {
+ *(*uintptr)(unsafe.Pointer(v)) = p
+ v += unsafe.Sizeof(uintptr(0))
+ }
+
+ getservbynameStaticResult = netdb.Servent{
+ Fs_name: cname,
+ Fs_aliases: v,
+ Fs_port: int32(servent.Port),
+ Fs_proto: protoname,
+ }
+ return uintptr(unsafe.Pointer(&getservbynameStaticResult))
+}
+
+func Xreaddir64(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
+ return Xreaddir(t, dir)
+}
+
+func __syscall(r, _ uintptr, errno syscall.Errno) long {
+ if errno != 0 {
+ return long(-errno)
+ }
+
+ return long(r)
+}
+
+func X__syscall1(t *TLS, trap, p1 long) long {
+ if __ccgo_strace {
+ trc("t=%v p1=%v, (%v:)", t, p1, origin(2))
+ }
+ return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0))
+}
+
+func X__syscall3(t *TLS, trap, p1, p2, p3 long) long {
+ if __ccgo_strace {
+ trc("t=%v p3=%v, (%v:)", t, p3, origin(2))
+ }
+ return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3)))
+}
+
+func X__syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
+ if __ccgo_strace {
+ trc("t=%v p4=%v, (%v:)", t, p4, origin(2))
+ }
+ return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0))
+}
+
+func fcntlCmdStr(cmd int32) string {
+ switch cmd {
+ case fcntl.F_GETOWN:
+ return "F_GETOWN"
+ case fcntl.F_SETLK:
+ return "F_SETLK"
+ case fcntl.F_GETLK:
+ return "F_GETLK"
+ case fcntl.F_SETFD:
+ return "F_SETFD"
+ case fcntl.F_GETFD:
+ return "F_GETFD"
+ default:
+ return fmt.Sprintf("cmd(%d)", cmd)
+ }
+}
+
+// int setenv(const char *name, const char *value, int overwrite);
+func Xsetenv(t *TLS, name, value uintptr, overwrite int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v value=%v overwrite=%v, (%v:)", t, value, overwrite, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int unsetenv(const char *name);
+func Xunsetenv(t *TLS, name uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
+ panic(todo(""))
+}
+
+// int pause(void);
+func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ err := unix.Pause()
+ if err != nil {
+ t.setErrno(err)
+ }
+
+ return -1
+}
+
+// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
+func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
+ // if dmesgs {
+ // dmesg("%v: fd %v iov %#x iovcnt %v", origin(1), fd, iov, iovcnt)
+ // }
+ if iovcnt == 0 {
+ panic(todo(""))
+ }
+
+ iovs := make([][]byte, iovcnt)
+ for ; iovcnt != 0; iovcnt-- {
+ base := (*unix.Iovec)(unsafe.Pointer(iov)).Base
+ len := (*unix.Iovec)(unsafe.Pointer(iov)).Len
+ // if dmesgs {
+ // dmesg("%v: base %#x len %v", origin(1), base, len)
+ // }
+ if base != nil && len != 0 {
+ iovs = append(iovs, (*RawMem)(unsafe.Pointer(base))[:len:len])
+ iov += unsafe.Sizeof(unix.Iovec{})
+ }
+ }
+ n, err := unix.Writev(int(fd), iovs)
+ if err != nil {
+ // if dmesgs {
+ // dmesg("%v: %v", origin(1), err)
+ // }
+ panic(todo(""))
+ }
+
+ return types.Ssize_t(n)
+}
+
+// int __isoc99_sscanf(const char *str, const char *format, ...);
+func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
+ r := Xsscanf(t, str, format, va)
+ // if dmesgs {
+ // dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
+ // }
+ return r
+}
+
+// var ctimeStaticBuf [32]byte
+//
+// // char *ctime(const time_t *timep);
+// func Xctime(t *TLS, timep uintptr) uintptr {
+// return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
+// }
+//
+// // char *ctime_r(const time_t *timep, char *buf);
+// func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
+// ut := *(*unix.Time_t)(unsafe.Pointer(timep))
+// tm := time.Unix(int64(ut), 0).Local()
+// s := tm.Format(time.ANSIC) + "\n\x00"
+// copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s)
+// return buf
+// }
+
+// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
+func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
+ var n int
+ var err error
+ switch {
+ case count == 0:
+ n, err = unix.Pwrite(int(fd), nil, int64(offset))
+ default:
+ n, err = unix.Pwrite(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, count %#x\n%s", origin(1), fd, offset, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
+ // }
+ }
+ 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.Ssize_t(n)
+}
+
+// int fstatfs(int fd, struct statfs *buf);
+func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2))
+ }
+ panic(todo(""))
+ // if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
+func Xgetrandom(t *TLS, buf uintptr, buflen size_t, flags uint32) ssize_t {
+ if __ccgo_strace {
+ trc("t=%v buf=%v buflen=%v flags=%v, (%v:)", t, buf, buflen, flags, origin(2))
+ }
+ panic(todo(""))
+ // n, err := unix.Getrandom((*RawMem)(unsafe.Pointer(buf))[:buflen], int(flags))
+ // if err != nil {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return ssize_t(n)
+}
+
+// int posix_fadvise(int fd, off_t offset, off_t len, int advice);
+func Xposix_fadvise(t *TLS, fd int32, offset, len types.Off_t, advice int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v len=%v advice=%v, (%v:)", t, fd, len, advice, origin(2))
+ }
+ panic(todo(""))
+ // if err := unix.Fadvise(int(fd), int64(offset), int64(len), int(advice)); err != nil {
+ // return int32(err.(unix.Errno))
+ // }
+
+ // return 0
+}
+
+// int fgetc(FILE *stream);
+func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ panic(todo(""))
+ // ungetcMu.Lock()
+ // c, ok := ungetc[stream]
+ // delete(ungetc, stream)
+ // ungetcMu.Unlock()
+ // if ok {
+ // return int32(c)
+ // }
+ //
+ // fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno)
+ // var buf [1]byte
+ // if n, _ := unix.Read(fd, buf[:]); n != 0 {
+ // return int32(buf[0])
+ // }
+ //
+ // file(stream).orFlags(m_F_EOF)
+ // return stdio.EOF
+}
+
+// void uuid_copy(uuid_t dst, uuid_t src);
+func Xuuid_copy(t *TLS, dst, src uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ }
+ *(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
+}
+
+// int uuid_parse( char *in, uuid_t uu);
+func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
+ r, err := guuid.Parse(GoString(in))
+ if err != nil {
+ return -1
+ }
+
+ copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:])
+ return 0
+}
+
+// int mkdirat(int dirfd, const char *pathname, mode_t mode);
+func Xmkdirat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v, (%v:)", t, dirfd, pathname, mode, origin(2))
+ }
+ // From golang.org/x/sys/unix/zsyscall_linux.go
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_MKDIRAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int symlinkat(const char *target, int newdirfd, const char *linkpath);
+func Xsymlinkat(t *TLS, target uintptr, newdirfd int32, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v target=%v newdirfd=%v linkpath=%v, (%v:)", t, target, newdirfd, linkpath, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall(unix.SYS_SYMLINKAT, target, uintptr(newdirfd), linkpath); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int utimensat(int dirfd, const char *pathname, const struct timespec times[2], int flags);
+func Xutimensat(t *TLS, dirfd int32, pathname, times uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v times=%v flags=%v, (%v:)", t, dirfd, times, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(dirfd), pathname, times, uintptr(flags), 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int unlinkat(int dirfd, const char *pathname, int flags);
+func Xunlinkat(t *TLS, dirfd int32, pathname uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v, (%v:)", t, dirfd, pathname, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall(unix.SYS_UNLINKAT, uintptr(dirfd), pathname, uintptr(flags)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int faccessat(int dirfd, const char *pathname, int mode, int flags);
+func Xfaccessat(t *TLS, dirfd int32, pathname uintptr, mode, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v, (%v:)", t, dirfd, pathname, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall(unix.SYS_FACCESSAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags);
+func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall6(unix.SYS_RENAMEAT2, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev);
+func Xmknodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v dev=%v, (%v:)", t, dirfd, pathname, mode, dev, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall6(unix.SYS_MKNODAT, uintptr(dirfd), pathname, uintptr(mode), uintptr(dev), 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags);
+func Xfchownat(t *TLS, dirfd int32, pathname uintptr, uid types.Uid_t, gid types.Gid_t, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v uid=%v gid=%v flags=%v, (%v:)", t, dirfd, pathname, uid, gid, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall6(unix.SYS_FCHOWNAT, uintptr(dirfd), pathname, uintptr(uid), uintptr(gid), uintptr(flags), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);
+func Xlinkat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2))
+ }
+ panic(todo(""))
+ // // From golang.org/x/sys/unix/zsyscall_linux.go
+ // if _, _, err := unix.Syscall6(unix.SYS_LINKAT, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int pipe2(int pipefd[2], int flags);
+func Xpipe2(t *TLS, pipefd uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v flags=%v, (%v:)", t, pipefd, flags, origin(2))
+ }
+ // From golang.org/x/sys/unix/zsyscall_linux.go
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_PIPE2, pipefd, uintptr(flags), 0); err != 0 {
+ // t.setErrno(t)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// int dup3(int oldfd, int newfd, int flags);
+func Xdup3(t *TLS, oldfd int32, newfd int32, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v oldfd=%v newfd=%v flags=%v, (%v:)", t, oldfd, newfd, flags, origin(2))
+ }
+ // From golang.org/x/sys/unix/zsyscall_linux.go
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
+func Xreadlinkat(t *TLS, dirfd int32, pathname, buf uintptr, bufsiz types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v buf=%v bufsiz=%v, (%v:)", t, dirfd, buf, bufsiz, origin(2))
+ }
+ // From golang.org/x/sys/unix/zsyscall_linux.go
+ panic(todo(""))
+ // n, _, err := unix.Syscall6(unix.SYS_READLINKAT, uintptr(dirfd), pathname, buf, uintptr(bufsiz), 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return types.Ssize_t(n)
+}
+
+// int nanosleep(const struct timespec *req, struct timespec *rem);
+func Xnanosleep(t *TLS, req, rem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v rem=%v, (%v:)", t, rem, origin(2))
+ }
+ v := *(*ctime.Timespec)(unsafe.Pointer(req))
+ time.Sleep(time.Second*time.Duration(v.Ftv_sec) + time.Duration(v.Ftv_nsec))
+ return 0
+}
+
+func Xfeof(t *TLS, f uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v f=%v, (%v:)", t, f, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ panic(todo(""))
+ // X__lockfile(t, f)
+ // r = BoolInt32(!!((*stdio.FILE)(unsafe.Pointer(f)).F_flags&Int32FromInt32(m_F_EOF) != 0))
+ // X__unlockfile(t, f)
+ // return r
+}
+
+type byteScanner struct {
+ t *TLS
+ stream uintptr
+
+ last byte
+}
+
+func (s *byteScanner) ReadByte() (byte, error) {
+ c := Xfgetc(s.t, s.stream)
+ if c < 0 {
+ return 0, io.EOF
+ }
+
+ s.last = byte(c)
+ return byte(c), nil
+}
+
+func (s *byteScanner) UnreadByte() error {
+ Xungetc(s.t, int32(s.last), s.stream)
+ return nil
+}
diff --git a/vendor/modernc.org/libc/libc_illumos_amd64.go b/vendor/modernc.org/libc/libc_illumos_amd64.go
new file mode 100644
index 000000000..ae67a9342
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_illumos_amd64.go
@@ -0,0 +1,794 @@
+// 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 libc // import "modernc.org/libc"
+
+import (
+ // "os"
+ // "strings"
+ gotime "time"
+ "unicode"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+ // "modernc.org/libc/errno"
+ "modernc.org/libc/fcntl"
+ // "modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
+ "modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
+ "modernc.org/libc/wctype"
+)
+
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
+// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
+func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
+ panic(todo(""))
+ // // musl/arch/x86_64/ksigaction.h
+ // //
+ // // struct k_sigaction {
+ // // void (*handler)(int);
+ // // unsigned long flags;
+ // // void (*restorer)(void);
+ // // unsigned mask[2];
+ // // };
+ // type k_sigaction struct {
+ // handler uintptr
+ // flags ulong
+ // restorer uintptr
+ // mask [2]uint32
+ // }
+ //
+ // var kact, koldact uintptr
+ // if act != 0 {
+ // sz := int(unsafe.Sizeof(k_sigaction{}))
+ // kact = t.Alloc(sz)
+ // defer t.Free(sz)
+ // *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{
+ // handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler,
+ // flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags),
+ // restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer,
+ // }
+ // Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask)))
+ // }
+ // if oldact != 0 {
+ // panic(todo(""))
+ // }
+ //
+ // if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // if oldact != 0 {
+ // panic(todo(""))
+ // }
+ //
+ // return 0
+}
+
+// int fcntl(int fd, int cmd, ... /* arg */ );
+func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
+ var arg uintptr
+ if args != 0 {
+ arg = *(*uintptr)(unsafe.Pointer(args))
+ }
+ if cmd == fcntl.F_SETFL {
+ arg |= unix.O_LARGEFILE
+ }
+ panic(todo(""))
+ // 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 lstat(const char *pathname, struct stat *statbuf);
+func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %q: %v", 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 __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // // }
+ // return 0
+}
+
+// int fstat(int fd, struct stat *statbuf);
+func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
+ // // }
+ // return 0
+}
+
+func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
+ return Xmmap64(t, addr, length, prot, flags, fd, offset)
+}
+
+// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
+ panic(todo(""))
+ // data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
+ // if err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %v", origin(1), err)
+ // // }
+ // t.setErrno(err)
+ // return ^uintptr(0) // (void*)-1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %#x", origin(1), data)
+ // // }
+ // return data
+}
+
+// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
+func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
+ panic(todo(""))
+ // var arg uintptr
+ // if args != 0 {
+ // arg = *(*uintptr)(unsafe.Pointer(args))
+ // }
+ // data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0)
+ // if err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %v", origin(1), err)
+ // // }
+ // t.setErrno(err)
+ // return ^uintptr(0) // (void*)-1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %#x", origin(1), data)
+ // // }
+ // return data
+}
+
+// int ftruncate(int fd, off_t length);
+func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %d %#x: ok", origin(1), fd, length)
+ // // }
+ // 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ // if err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // // if dmesgs {
+ // // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
+ // // }
+ // return types.Off_t(n)
+}
+
+// int utime(const char *filename, const struct utimbuf *times);
+func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+
+ // return 0
+}
+
+// unsigned int alarm(unsigned int seconds);
+func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
+ // if err != 0 {
+ // panic(todo(""))
+ // }
+ //
+ // return uint32(n)
+}
+
+// time_t time(time_t *tloc);
+func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return types.Time_t(-1)
+ // }
+ //
+ // if tloc != 0 {
+ // *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
+ // }
+ // return types.Time_t(n)
+}
+
+// int getrlimit(int resource, struct rlimit *rlim);
+func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return 0
+}
+
+// int mkdir(const char *path, mode_t mode);
+func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(path))
+ // // }
+ // return 0
+}
+
+// int symlink(const char *target, const char *linkpath);
+func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath))
+ // // }
+ // return 0
+}
+
+// int chmod(const char *pathname, mode_t mode)
+func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // // }
+ // return 0
+}
+
+// int utimes(const char *filename, const struct timeval times[2]);
+func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(filename))
+ // // }
+ // return 0
+}
+
+// int unlink(const char *pathname);
+func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // // }
+ // return 0
+}
+
+// int access(const char *pathname, int mode);
+func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
+ // // if dmesgs {
+ // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // // }
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // // }
+ // return 0
+}
+
+// int rmdir(const char *pathname);
+func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // // if dmesgs {
+ // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // // }
+ // return 0
+}
+
+// int rename(const char *oldpath, const char *newpath);
+func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
+ // t.setErrno(err)
+ // return -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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
+ // t.setErrno(err)
+ // return -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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
+ panic(todo(""))
+ // 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 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return 0
+}
+
+// int pipe(int pipefd[2]);
+func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return 0
+}
+
+// int dup2(int oldfd, int newfd);
+func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
+ 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)
+}
+
+// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return types.Ssize_t(n)
+}
+
+// FILE *fopen64(const char *pathname, const char *mode);
+func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
+ panic(todo(""))
+ // m := strings.ReplaceAll(GoString(mode), "b", "")
+ // var flags int
+ // switch m {
+ // case "r":
+ // flags = os.O_RDONLY
+ // case "r+":
+ // flags = os.O_RDWR
+ // case "w":
+ // flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC
+ // case "w+":
+ // flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC
+ // case "a":
+ // flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND
+ // case "a+":
+ // flags = os.O_RDWR | os.O_CREATE | os.O_APPEND
+ // default:
+ // panic(m)
+ // }
+ // //TODO- flags |= fcntl.O_LARGEFILE
+ // fd, _, err := unix.Syscall(unix.SYS_OPEN, pathname, uintptr(flags|unix.O_LARGEFILE), 0666)
+ // if err != 0 {
+ // t.setErrno(err)
+ // return 0
+ // }
+ //
+ // if p := newFile(t, int32(fd)); p != 0 {
+ // return p
+ // }
+ //
+ // Xclose(t, int32(fd))
+ // t.setErrno(errno.ENOMEM)
+ // return 0
+}
+
+// int iswspace(wint_t wc);
+func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
+ return Bool32(unicode.IsSpace(rune(wc)))
+}
+
+// int iswalnum(wint_t wc);
+func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
+ return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
+}
+
+// int setrlimit(int resource, const struct rlimit *rlim);
+func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ panic(todo(""))
+ // if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return 0
+}
+
+func AtomicLoadPInt8(addr uintptr) (val int8) {
+ return int8(a_load_8(addr))
+}
+
+func AtomicLoadPInt16(addr uintptr) (val int16) {
+ return int16(a_load_16(addr))
+}
+
+func AtomicLoadPUint8(addr uintptr) byte {
+ return byte(a_load_8(addr))
+}
+
+func AtomicLoadPUint16(addr uintptr) uint16 {
+ return uint16(a_load_16(addr))
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux.go b/vendor/modernc.org/libc/libc_linux.go
index c150af547..98e9c6373 100644
--- a/vendor/modernc.org/libc/libc_linux.go
+++ b/vendor/modernc.org/libc/libc_linux.go
@@ -5,13 +5,14 @@
package libc // import "modernc.org/libc"
import (
- "encoding/hex"
+ // "encoding/hex"
"fmt"
+ "io"
"os"
"os/exec"
"path/filepath"
"runtime"
- "runtime/debug"
+ // "runtime/debug"
"syscall"
"time"
"unsafe"
@@ -94,18 +95,27 @@ func fwrite(fd int32, b []byte) (int, error) {
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := fwrite((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno, printf(format, args))
return int32(n)
}
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec types.X__useconds_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
time.Sleep(time.Microsecond * time.Duration(usec))
return 0
}
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
t.setErrno(err)
return -1
@@ -116,16 +126,25 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -175,11 +194,17 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
return Xopen64(t, pathname, flags, args)
}
// int open(const char *pathname, int flags, ...);
func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
//TODO- flags |= fcntl.O_LARGEFILE
var mode types.Mode_t
if args != 0 {
@@ -203,6 +228,9 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// int openat(int dirfd, const char *pathname, int flags, mode_t mode);
func Xopenat(t *TLS, dirfd int32, pathname uintptr, flags int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v mode=%v, (%v:)", t, dirfd, pathname, flags, mode, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
fd, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(dirfd), pathname, uintptr(flags), uintptr(mode), 0, 0)
if err != 0 {
@@ -215,6 +243,9 @@ func Xopenat(t *TLS, dirfd int32, pathname uintptr, flags int32, mode types.Mode
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -235,6 +266,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if noFsync {
// Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
@@ -253,6 +287,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
switch name {
case unistd.X_SC_PAGESIZE:
return long(unix.Getpagesize())
@@ -269,6 +306,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -282,6 +322,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_GETCWD, buf, uintptr(size), 0)
if err != 0 {
t.setErrno(err)
@@ -296,21 +339,33 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
return Xftruncate64(t, fd, length)
}
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
// ssize_t read(int fd, void *buf, size_t count);
func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count))
if err != 0 {
t.setErrno(err)
@@ -326,6 +381,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// ssize_t write(int fd, const void *buf, size_t count);
func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
const retry = 5
var err syscall.Errno
for i := 0; i < retry; i++ {
@@ -351,6 +409,9 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -364,6 +425,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags);
func Xfchmodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v flags=%v, (%v:)", t, dirfd, pathname, mode, flags, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
// Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior
// and check the flags. Otherwise the mode would be applied to the symlink
@@ -387,6 +451,9 @@ func Xfchmodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, flags i
// int fchown(int fd, uid_t owner, gid_t group);
func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -397,12 +464,18 @@ func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
// uid_t geteuid(void);
func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0)
return types.Uid_t(n)
}
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
t.setErrno(err)
return -1
@@ -413,6 +486,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
if tz != 0 {
panic(todo(""))
}
@@ -430,6 +506,9 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
t.setErrno(err)
return -1
@@ -440,6 +519,9 @@ func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) i
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
t.setErrno(err)
return -1
@@ -450,6 +532,9 @@ func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen so
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
var argp uintptr
if va != 0 {
argp = VaUintptr(&va)
@@ -465,6 +550,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 {
// if dmesgs {
// dmesg("%v: fd %v: %v", origin(1), sockfd, err)
@@ -478,6 +566,9 @@ func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
n, err := unix.Select(
int(nfds),
(*unix.FdSet)(unsafe.Pointer(readfds)),
@@ -495,6 +586,9 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Mkfifo(GoString(pathname), mode); err != nil {
t.setErrno(err)
return -1
@@ -505,12 +599,18 @@ func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
return types.Mode_t(n)
}
// int execvp(const char *file, char *const argv[]);
func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
t.setErrno(err)
return -1
@@ -521,6 +621,9 @@ func Xexecvp(t *TLS, file, argv uintptr) int32 {
// pid_t waitpid(pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -532,6 +635,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UNAME, buf, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -542,6 +648,9 @@ func Xuname(t *TLS, buf uintptr) int32 {
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -553,6 +662,9 @@ func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -564,6 +676,9 @@ func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// int shutdown(int sockfd, int how);
func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
t.setErrno(err)
return -1
@@ -574,6 +689,9 @@ func Xshutdown(t *TLS, sockfd, how int32) int32 {
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -584,6 +702,9 @@ func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int socket(int domain, int type, int protocol);
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
if err != 0 {
t.setErrno(err)
@@ -595,6 +716,9 @@ func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
if err != 0 {
t.setErrno(err)
@@ -606,6 +730,9 @@ func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -616,6 +743,9 @@ func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int listen(int sockfd, int backlog);
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
t.setErrno(err)
return -1
@@ -626,6 +756,9 @@ func Xlisten(t *TLS, sockfd, backlog int32) int32 {
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -637,26 +770,41 @@ func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xgetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xsetrlimit64(t, resource, rlim)
}
// uid_t getuid(void);
func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return types.Uid_t(os.Getuid())
}
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(os.Getpid())
}
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -676,26 +824,41 @@ func Xsystem(t *TLS, command uintptr) int32 {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
// int backtrace(void **buffer, int size);
func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
panic(todo(""))
}
// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
panic(todo(""))
}
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if stream == 0 {
t.setErrno(errno.EBADF)
return -1
@@ -763,11 +926,17 @@ func (f *ftstream) close(t *TLS) {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
return Xfts64_open(t, path_argv, options, compar)
}
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
f := &ftstream{}
var walk func(string)
@@ -872,11 +1041,17 @@ func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintp
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_read(t, ftsp)
}
// FTSENT *fts_read(FTS *ftsp);
func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
t.setErrno(0)
@@ -893,11 +1068,17 @@ func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_close(t, ftsp)
}
// int fts_close(FTS *ftsp);
func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
getObject(ftsp).(*ftstream).close(t)
removeObject(ftsp)
return 0
@@ -905,6 +1086,9 @@ func Xfts64_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
@@ -912,40 +1096,61 @@ var strerrorBuf [100]byte
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
- if dmesgs {
- dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
}
+ // if dmesgs {
+ // dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
+ // }
copy(strerrorBuf[:], fmt.Sprintf("strerror(%d)\x00", errnum))
return uintptr(unsafe.Pointer(&strerrorBuf[0]))
}
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo("%q", GoString(filename)))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -953,37 +1158,58 @@ var gai_strerrorBuf [100]byte
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
return uintptr(unsafe.Pointer(&gai_strerrorBuf))
}
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
// speed_t cfgetospeed(const struct termios *termios_p);
func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
panic(todo(""))
}
// int cfsetospeed(struct termios *termios_p, speed_t speed);
func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// int cfsetispeed(struct termios *termios_p, speed_t speed);
func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
t.setErrno(errno.ENOSYS)
return -1
}
@@ -992,21 +1218,33 @@ var emptyStr = [1]byte{}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// char *nl_langinfo(nl_item item);
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1033,21 +1271,25 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
return resolved_path
}
-// struct tm *gmtime_r(const time_t *timep, struct tm *result);
-func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
- panic(todo(""))
-}
-
// char *inet_ntoa(struct in_addr in);
func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uintptr(unsafe.Pointer(&in6_addr_any))
}
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
// if dmesgs {
// dmesg("%v:\n%s", origin(1), debug.Stack())
// }
@@ -1067,11 +1309,17 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return 0 //TODO
}
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_READ, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if m == 0 {
file(stream).orFlags(m_F_EOF)
@@ -1090,6 +1338,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1105,11 +1356,17 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return file(stream).close(t)
}
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -1119,6 +1376,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
@@ -1136,6 +1396,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
if n < 0 {
file(stream).setErr()
@@ -1150,21 +1413,40 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Bool32(file(stream).err())
}
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
+ if c == stdio.EOF {
+ return c
+ }
+
+ ungetcMu.Lock()
+ ungetc[stream] = byte(c)
+ ungetcMu.Unlock()
+ return int32(byte(c))
}
// int fscanf(FILE *stream, const char *format, ...);
func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
+ return scanf(&byteScanner{t: t, stream: stream}, format, va)
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
return -1
}
@@ -1176,6 +1458,9 @@ var getservbynameStaticResult netdb.Servent
// struct servent *getservbyname(const char *name, const char *proto);
func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
var protoent *gonetdb.Protoent
if proto != 0 {
protoent = gonetdb.GetProtoByName(GoString(proto))
@@ -1253,6 +1538,9 @@ func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
}
func Xreaddir64(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
return Xreaddir(t, dir)
}
@@ -1265,14 +1553,23 @@ func __syscall(r, _ uintptr, errno syscall.Errno) long {
}
func X__syscall1(t *TLS, trap, p1 long) long {
+ if __ccgo_strace {
+ trc("t=%v p1=%v, (%v:)", t, p1, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0))
}
func X__syscall3(t *TLS, trap, p1, p2, p3 long) long {
+ if __ccgo_strace {
+ trc("t=%v p3=%v, (%v:)", t, p3, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3)))
}
func X__syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
+ if __ccgo_strace {
+ trc("t=%v p4=%v, (%v:)", t, p4, origin(2))
+ }
return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0))
}
@@ -1295,16 +1592,25 @@ func fcntlCmdStr(cmd int32) string {
// int setenv(const char *name, const char *value, int overwrite);
func Xsetenv(t *TLS, name, value uintptr, overwrite int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v value=%v overwrite=%v, (%v:)", t, value, overwrite, origin(2))
+ }
panic(todo(""))
}
// int unsetenv(const char *name);
func Xunsetenv(t *TLS, name uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
panic(todo(""))
}
// int pause(void);
func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
err := unix.Pause()
if err != nil {
t.setErrno(err)
@@ -1315,6 +1621,9 @@ func Xpause(t *TLS) int32 {
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
// if dmesgs {
// dmesg("%v: fd %v iov %#x iovcnt %v", origin(1), fd, iov, iovcnt)
// }
@@ -1347,6 +1656,9 @@ func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := Xsscanf(t, str, format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1372,6 +1684,9 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
var n int
var err error
switch {
@@ -1379,26 +1694,29 @@ func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off
n, err = unix.Pwrite(int(fd), nil, int64(offset))
default:
n, err = unix.Pwrite(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
- if dmesgs {
- dmesg("%v: fd %v, off %#x, count %#x\n%s", origin(1), fd, offset, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
- }
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, count %#x\n%s", origin(1), fd, offset, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
+ // }
}
if err != nil {
- if dmesgs {
- dmesg("%v: %v FAIL", origin(1), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v FAIL", origin(1), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: ok", origin(1))
- }
+ // if dmesgs {
+ // dmesg("%v: ok", origin(1))
+ // }
return types.Ssize_t(n)
}
// int fstatfs(int fd, struct statfs *buf);
func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v, (%v:)", t, fd, buf, origin(2))
+ }
if err := unix.Fstatfs(int(fd), (*unix.Statfs_t)(unsafe.Pointer(buf))); err != nil {
t.setErrno(err)
return -1
@@ -1409,6 +1727,9 @@ func Xfstatfs(t *TLS, fd int32, buf uintptr) int32 {
// ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
func Xgetrandom(t *TLS, buf uintptr, buflen size_t, flags uint32) ssize_t {
+ if __ccgo_strace {
+ trc("t=%v buf=%v buflen=%v flags=%v, (%v:)", t, buf, buflen, flags, origin(2))
+ }
n, err := unix.Getrandom((*RawMem)(unsafe.Pointer(buf))[:buflen], int(flags))
if err != nil {
t.setErrno(err)
@@ -1420,6 +1741,9 @@ func Xgetrandom(t *TLS, buf uintptr, buflen size_t, flags uint32) ssize_t {
// int posix_fadvise(int fd, off_t offset, off_t len, int advice);
func Xposix_fadvise(t *TLS, fd int32, offset, len types.Off_t, advice int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v len=%v advice=%v, (%v:)", t, fd, len, advice, origin(2))
+ }
if err := unix.Fadvise(int(fd), int64(offset), int64(len), int(advice)); err != nil {
return int32(err.(unix.Errno))
}
@@ -1429,6 +1753,17 @@ func Xposix_fadvise(t *TLS, fd int32, offset, len types.Off_t, advice int32) int
// int fgetc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ ungetcMu.Lock()
+ c, ok := ungetc[stream]
+ delete(ungetc, stream)
+ ungetcMu.Unlock()
+ if ok {
+ return int32(c)
+ }
+
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno)
var buf [1]byte
if n, _ := unix.Read(fd, buf[:]); n != 0 {
@@ -1441,11 +1776,17 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// void uuid_copy(uuid_t dst, uuid_t src);
func Xuuid_copy(t *TLS, dst, src uintptr) {
+ if __ccgo_strace {
+ trc("t=%v src=%v, (%v:)", t, src, origin(2))
+ }
*(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
}
// int uuid_parse( char *in, uuid_t uu);
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
r, err := guuid.Parse(GoString(in))
if err != nil {
return -1
@@ -1457,6 +1798,9 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
// int mkdirat(int dirfd, const char *pathname, mode_t mode);
func Xmkdirat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v, (%v:)", t, dirfd, pathname, mode, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_MKDIRAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 {
t.setErrno(err)
@@ -1468,6 +1812,9 @@ func Xmkdirat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t) int32 {
// int symlinkat(const char *target, int newdirfd, const char *linkpath);
func Xsymlinkat(t *TLS, target uintptr, newdirfd int32, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v target=%v newdirfd=%v linkpath=%v, (%v:)", t, target, newdirfd, linkpath, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_SYMLINKAT, target, uintptr(newdirfd), linkpath); err != 0 {
t.setErrno(err)
@@ -1479,6 +1826,9 @@ func Xsymlinkat(t *TLS, target uintptr, newdirfd int32, linkpath uintptr) int32
// int utimensat(int dirfd, const char *pathname, const struct timespec times[2], int flags);
func Xutimensat(t *TLS, dirfd int32, pathname, times uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v times=%v flags=%v, (%v:)", t, dirfd, times, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall6(unix.SYS_UTIMENSAT, uintptr(dirfd), pathname, times, uintptr(flags), 0, 0); err != 0 {
t.setErrno(err)
@@ -1490,6 +1840,9 @@ func Xutimensat(t *TLS, dirfd int32, pathname, times uintptr, flags int32) int32
// int unlinkat(int dirfd, const char *pathname, int flags);
func Xunlinkat(t *TLS, dirfd int32, pathname uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v, (%v:)", t, dirfd, pathname, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_UNLINKAT, uintptr(dirfd), pathname, uintptr(flags)); err != 0 {
t.setErrno(err)
@@ -1501,6 +1854,9 @@ func Xunlinkat(t *TLS, dirfd int32, pathname uintptr, flags int32) int32 {
// int faccessat(int dirfd, const char *pathname, int mode, int flags);
func Xfaccessat(t *TLS, dirfd int32, pathname uintptr, mode, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v flags=%v, (%v:)", t, dirfd, pathname, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_FACCESSAT, uintptr(dirfd), pathname, uintptr(mode)); err != 0 {
t.setErrno(err)
@@ -1512,6 +1868,9 @@ func Xfaccessat(t *TLS, dirfd int32, pathname uintptr, mode, flags int32) int32
// int renameat2(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, unsigned int flags);
func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall6(unix.SYS_RENAMEAT2, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 {
t.setErrno(err)
@@ -1523,6 +1882,9 @@ func Xrenameat2(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath
// int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev);
func Xmknodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v mode=%v dev=%v, (%v:)", t, dirfd, pathname, mode, dev, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall6(unix.SYS_MKNODAT, uintptr(dirfd), pathname, uintptr(mode), uintptr(dev), 0, 0); err != 0 {
t.setErrno(err)
@@ -1534,6 +1896,9 @@ func Xmknodat(t *TLS, dirfd int32, pathname uintptr, mode types.Mode_t, dev type
// int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags);
func Xfchownat(t *TLS, dirfd int32, pathname uintptr, uid types.Uid_t, gid types.Gid_t, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v pathname=%v uid=%v gid=%v flags=%v, (%v:)", t, dirfd, pathname, uid, gid, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall6(unix.SYS_FCHOWNAT, uintptr(dirfd), pathname, uintptr(uid), uintptr(gid), uintptr(flags), 0); err != 0 {
t.setErrno(err)
@@ -1545,6 +1910,9 @@ func Xfchownat(t *TLS, dirfd int32, pathname uintptr, uid types.Uid_t, gid types
// int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);
func Xlinkat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v flags=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall6(unix.SYS_LINKAT, uintptr(olddirfd), oldpath, uintptr(newdirfd), newpath, uintptr(flags), 0); err != 0 {
t.setErrno(err)
@@ -1556,6 +1924,9 @@ func Xlinkat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath ui
// int pipe2(int pipefd[2], int flags);
func Xpipe2(t *TLS, pipefd uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v flags=%v, (%v:)", t, pipefd, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_PIPE2, pipefd, uintptr(flags), 0); err != 0 {
t.setErrno(t)
@@ -1567,6 +1938,9 @@ func Xpipe2(t *TLS, pipefd uintptr, flags int32) int32 {
// int dup3(int oldfd, int newfd, int flags);
func Xdup3(t *TLS, oldfd int32, newfd int32, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v oldfd=%v newfd=%v flags=%v, (%v:)", t, oldfd, newfd, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
if _, _, err := unix.Syscall(unix.SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)); err != 0 {
t.setErrno(err)
@@ -1578,6 +1952,9 @@ func Xdup3(t *TLS, oldfd int32, newfd int32, flags int32) int32 {
// ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
func Xreadlinkat(t *TLS, dirfd int32, pathname, buf uintptr, bufsiz types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v buf=%v bufsiz=%v, (%v:)", t, dirfd, buf, bufsiz, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux.go
n, _, err := unix.Syscall6(unix.SYS_READLINKAT, uintptr(dirfd), pathname, buf, uintptr(bufsiz), 0, 0)
if err != 0 {
@@ -1590,14 +1967,43 @@ func Xreadlinkat(t *TLS, dirfd int32, pathname, buf uintptr, bufsiz types.Size_t
// int nanosleep(const struct timespec *req, struct timespec *rem);
func Xnanosleep(t *TLS, req, rem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v rem=%v, (%v:)", t, rem, origin(2))
+ }
v := *(*ctime.Timespec)(unsafe.Pointer(req))
time.Sleep(time.Second*time.Duration(v.Ftv_sec) + time.Duration(v.Ftv_nsec))
return 0
}
func Xfeof(t *TLS, f uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v f=%v, (%v:)", t, f, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
X__lockfile(t, f)
r = BoolInt32(!!((*stdio.FILE)(unsafe.Pointer(f)).F_flags&Int32FromInt32(m_F_EOF) != 0))
X__unlockfile(t, f)
return r
}
+
+type byteScanner struct {
+ t *TLS
+ stream uintptr
+
+ last byte
+}
+
+func (s *byteScanner) ReadByte() (byte, error) {
+ c := Xfgetc(s.t, s.stream)
+ if c < 0 {
+ return 0, io.EOF
+ }
+
+ s.last = byte(c)
+ return byte(c), nil
+}
+
+func (s *byteScanner) UnreadByte() error {
+ Xungetc(s.t, int32(s.last), s.stream)
+ return nil
+}
diff --git a/vendor/modernc.org/libc/libc_linux_386.go b/vendor/modernc.org/libc/libc_linux_386.go
index c1369dd5b..3fb508d85 100644
--- a/vendor/modernc.org/libc/libc_linux_386.go
+++ b/vendor/modernc.org/libc/libc_linux_386.go
@@ -7,18 +7,28 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
+ "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/stat"
"modernc.org/libc/sys/types"
+ ctime "modernc.org/libc/time"
+)
+
+var (
+ startTime = time.Now() // For clock(3)
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x32/ksigaction.h
//
// struct k_sigaction {
@@ -64,6 +74,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -88,6 +101,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LSTAT64, pathname, statbuf, 0); err != 0 {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -104,6 +120,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_STAT64, pathname, statbuf, 0); err != 0 {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -120,6 +139,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT64, uintptr(fd), statbuf, 0); err != 0 {
if dmesgs {
dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -136,6 +158,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -156,11 +181,17 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP2, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset>>12))
if err != 0 {
if dmesgs {
@@ -178,6 +209,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)); err != 0 {
if dmesgs {
dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -194,6 +228,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
bp := t.Alloc(int(unsafe.Sizeof(types.X__loff_t(0))))
defer t.Free(int(unsafe.Sizeof(types.X__loff_t(0))))
if _, _, err := unix.Syscall6(unix.SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), bp, uintptr(whence), 0); err != 0 {
@@ -212,6 +249,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -222,6 +262,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
if err != 0 {
panic(todo(""))
@@ -232,6 +275,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -242,6 +288,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -256,6 +305,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -269,6 +321,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -282,6 +337,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -295,6 +353,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -308,6 +369,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -321,6 +385,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -337,6 +404,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -350,6 +420,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -360,6 +433,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
t.setErrno(err)
return -1
@@ -370,6 +446,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -380,6 +459,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -390,6 +472,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -400,6 +485,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if err != 0 {
t.setErrno(err)
@@ -411,6 +499,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
if err != 0 {
t.setErrno(err)
@@ -422,6 +513,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -458,6 +552,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -465,3 +562,188 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+func AtomicLoadPInt8(addr uintptr) (val int8) {
+ return int8(a_load_8(addr))
+}
+
+func AtomicLoadPInt16(addr uintptr) (val int16) {
+ return int16(a_load_16(addr))
+}
+
+func AtomicLoadPUint8(addr uintptr) byte {
+ return byte(a_load_8(addr))
+}
+
+func AtomicLoadPUint16(addr uintptr) uint16 {
+ return uint16(a_load_16(addr))
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) ctime.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return ctime.Clock_t(time.Since(startTime) * time.Duration(ctime.CLOCKS_PER_SEC) / time.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux_amd64.go b/vendor/modernc.org/libc/libc_linux_amd64.go
index af96124d0..4aa055579 100644
--- a/vendor/modernc.org/libc/libc_linux_amd64.go
+++ b/vendor/modernc.org/libc/libc_linux_amd64.go
@@ -27,6 +27,9 @@ var (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x86_64/ksigaction.h
//
// struct k_sigaction {
@@ -72,6 +75,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -96,6 +102,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -112,6 +121,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -128,6 +140,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -143,11 +158,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
// if dmesgs {
@@ -165,6 +186,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -186,6 +210,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -202,6 +229,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
@@ -219,6 +249,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -229,6 +262,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
if err != 0 {
panic(todo(""))
@@ -239,6 +275,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -253,6 +292,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -263,6 +305,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -276,6 +321,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -289,6 +337,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -302,6 +353,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -315,6 +369,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -328,6 +385,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -344,6 +404,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -357,6 +420,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -367,6 +433,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
t.setErrno(err)
return -1
@@ -377,6 +446,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -387,6 +459,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -397,6 +472,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -407,6 +485,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if err != 0 {
t.setErrno(err)
@@ -418,6 +499,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
if err != 0 {
t.setErrno(err)
@@ -429,6 +513,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -465,16 +552,25 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -636,6 +732,10 @@ var _table1 = [384]int32{
var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
return uintptr(unsafe.Pointer(&_ptable1))
}
@@ -650,10 +750,16 @@ type Tin6_addr = struct {
var Xin6addr_any = Tin6_addr{}
func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
Xfseek(tls, f, 0, stdio.SEEK_SET)
}
// clock_t clock(void);
func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
}
diff --git a/vendor/modernc.org/libc/libc_linux_arm.go b/vendor/modernc.org/libc/libc_linux_arm.go
index ce45b1aed..8f9b85700 100644
--- a/vendor/modernc.org/libc/libc_linux_arm.go
+++ b/vendor/modernc.org/libc/libc_linux_arm.go
@@ -14,12 +14,21 @@ import (
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
- "modernc.org/libc/sys/stat"
+ "modernc.org/libc/stdio"
+ // "modernc.org/libc/sys/stat"
"modernc.org/libc/sys/types"
+ ctime "modernc.org/libc/time"
+)
+
+var (
+ startTime = time.Now() // For clock(3)
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x32/ksigaction.h
//
// struct k_sigaction {
@@ -65,6 +74,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -74,186 +86,249 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
}
n, _, err := unix.Syscall(unix.SYS_FCNTL64, uintptr(fd), uintptr(cmd), arg)
if err != 0 {
- if dmesgs {
- dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd)
- }
+ // 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)
- }
+ // if dmesgs {
+ // dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n)
+ // }
return int32(n)
}
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
- if dmesgs {
- dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(pathname))
- }
+ // 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 __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_STAT64, pathname, statbuf, 0); err != 0 {
- if dmesgs {
- dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(pathname))
- }
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
return 0
}
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT64, uintptr(fd), statbuf, 0); err != 0 {
- if dmesgs {
- dmesg("%v: fd %d: %v", origin(1), fd, err)
- }
+ // if dmesgs {
+ // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %d, size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
- }
+ // if dmesgs {
+ // dmesg("%v: %d, size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
+ // }
return 0
}
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
}
data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0)
if err != 0 {
- if dmesgs {
- dmesg("%v: %v", origin(1), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v", origin(1), err)
+ // }
t.setErrno(err)
return ^uintptr(0) // (void*)-1
}
- if dmesgs {
- dmesg("%v: %#x", origin(1), data)
- }
+ // if dmesgs {
+ // dmesg("%v: %#x", origin(1), data)
+ // }
return data
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP2, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset>>12))
if err != 0 {
- if dmesgs {
- dmesg("%v: %v", origin(1), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v", origin(1), err)
+ // }
t.setErrno(err)
return ^uintptr(0) // (void*)-1
}
- if dmesgs {
- dmesg("%v: %#x", origin(1), data)
- }
+ // if dmesgs {
+ // dmesg("%v: %#x", origin(1), data)
+ // }
return data
}
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath))
- }
+ // if dmesgs {
+ // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath))
+ // }
return 0
}
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- }
+ // if dmesgs {
+ // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // }
return 0
}
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0); err != 0 {
- if dmesgs {
- dmesg("%v: fd %d: %v", origin(1), fd, err)
- }
+ // if dmesgs {
+ // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %d %#x: ok", origin(1), fd, length)
- }
+ // if dmesgs {
+ // dmesg("%v: %d %#x: ok", origin(1), fd, length)
+ // }
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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
- if dmesgs {
- dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
- }
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
- }
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
+ // }
return types.Off_t(n)
}
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
- if err := unix.Utime(GoString(filename), (*unix.Utimbuf)(unsafe.Pointer(times))); err != nil {
- t.setErrno(err)
- return -1
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ if dmesgs {
+ dmesg("t=%v filename=%q times=%v, (%v:)", t, GoString(filename), times, origin(2))
+ }
+ switch {
+ case times == 0:
+ var buf unix.Utimbuf
+ tm := time.Now().Unix()
+ buf.Actime = int32(tm)
+ buf.Modtime = int32(tm)
+ if err := unix.Utime(GoString(filename), &buf); err != nil {
+ if dmesgs {
+ dmesg("t=%v err=%v", t, err)
+ }
+ t.setErrno(err)
+ return -1
+ }
+ default:
+ if err := unix.Utime(GoString(filename), (*unix.Utimbuf)(unsafe.Pointer(times))); err != nil {
+ if dmesgs {
+ dmesg("t=%v err=%v", t, err)
+ }
+ t.setErrno(err)
+ return -1
+ }
}
+ if dmesgs {
+ dmesg("t=%v OK", t)
+ }
return 0
}
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
}
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if err := unix.Getrlimit(int(resource), (*unix.Rlimit)(unsafe.Pointer(rlim))); err != nil {
t.setErrno(err)
return -1
@@ -264,6 +339,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n := time.Now().UTC().Unix()
if tloc != 0 {
*(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
@@ -273,6 +351,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var tv []unix.Timeval
if times != 0 {
tv = make([]unix.Timeval, 2)
@@ -286,56 +367,68 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
if times != 0 {
*(*[2]unix.Timeval)(unsafe.Pointer(times)) = *(*[2]unix.Timeval)(unsafe.Pointer(&tv[0]))
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(filename))
- }
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(filename))
+ // }
return 0
}
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlinkat(unix.AT_FDCWD, GoString(pathname), 0); err != nil {
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(pathname))
- }
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
return 0
}
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Faccessat(unix.AT_FDCWD, GoString(pathname), uint32(mode), 0); err != nil {
- if dmesgs {
- dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- }
+ // if dmesgs {
+ // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // }
return 0
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(pathname))
- }
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
return 0
}
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
t.setErrno(err)
return -1
@@ -346,11 +439,17 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
}
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if err := unix.Chown(GoString(pathname), int(owner), int(group)); err != nil {
t.setErrno(err)
return -1
@@ -361,11 +460,17 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
}
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE2, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -376,11 +481,17 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
}
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, err := unix.Readlink(GoString(path), GoBytes(buf, int(bufsize)))
if err != nil {
t.setErrno(err)
@@ -392,6 +503,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -428,14 +542,17 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: %q: ok", origin(1), GoString(path))
- }
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(path))
+ // }
return 0
}
@@ -450,6 +567,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -457,3 +577,172 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) ctime.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return ctime.Clock_t(time.Since(startTime) * time.Duration(ctime.CLOCKS_PER_SEC) / time.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux_arm64.go b/vendor/modernc.org/libc/libc_linux_arm64.go
index 1b83364e2..adefd2130 100644
--- a/vendor/modernc.org/libc/libc_linux_arm64.go
+++ b/vendor/modernc.org/libc/libc_linux_arm64.go
@@ -7,19 +7,28 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
- "time"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/stat"
"modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
+)
+
+var (
+ startTime = gotime.Now() // For clock(3)
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/src/internal/ksigaction.h
//
// struct k_sigaction {
@@ -65,6 +74,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -81,6 +93,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if err := unix.Fstatat(unix.AT_FDCWD, GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf)), 0); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -97,6 +112,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlinkat(unix.AT_FDCWD, GoString(pathname), 0); err != nil {
t.setErrno(err)
return -1
@@ -110,6 +128,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Faccessat(unix.AT_FDCWD, GoString(pathname), uint32(mode), 0); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -126,6 +147,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
if dmesgs {
@@ -143,6 +167,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
if dmesgs {
dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -159,6 +186,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
if dmesgs {
dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -175,6 +205,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -199,6 +232,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
t.setErrno(err)
return -1
@@ -212,6 +248,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
t.setErrno(err)
return -1
@@ -222,11 +261,17 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
}
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if err := unix.Chown(GoString(pathname), int(owner), int(group)); err != nil {
t.setErrno(err)
return -1
@@ -237,11 +282,17 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
}
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE2, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -252,11 +303,17 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
}
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -267,6 +324,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, err := unix.Readlink(GoString(path), GoBytes(buf, int(bufsize)))
if err != nil {
t.setErrno(err)
@@ -278,6 +338,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -314,6 +377,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
t.setErrno(err)
return -1
@@ -327,6 +393,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -347,11 +416,17 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
if dmesgs {
@@ -369,6 +444,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
t.setErrno(err)
return -1
@@ -382,6 +460,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
t.setErrno(err)
return -1
@@ -395,7 +476,10 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
- n := time.Now().UTC().Unix()
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
+ n := gotime.Now().UTC().Unix()
if tloc != 0 {
*(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
}
@@ -404,6 +488,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var tv []unix.Timeval
if times != 0 {
tv = make([]unix.Timeval, 2)
@@ -425,6 +512,13 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ if times == 0 {
+ return Xutimes(t, filename, 0)
+ }
+
if err := unix.Utime(GoString(filename), (*unix.Utimbuf)(unsafe.Pointer(times))); err != nil {
t.setErrno(err)
return -1
@@ -435,11 +529,17 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -447,3 +547,183 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
+
+const __NFDBITS = 64
+
+func X__fdelt_chk(tls *TLS, d int64) (r int64) {
+ if __ccgo_strace {
+ trc("tls=%v d=%v, (%v:)", tls, d, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+
+ return d / __NFDBITS
+}
diff --git a/vendor/modernc.org/libc/libc_linux_loong64.go b/vendor/modernc.org/libc/libc_linux_loong64.go
index 9dfea4572..efb5b48b0 100644
--- a/vendor/modernc.org/libc/libc_linux_loong64.go
+++ b/vendor/modernc.org/libc/libc_linux_loong64.go
@@ -7,6 +7,8 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
+ "syscall"
+ gotime "time"
"unicode"
"unsafe"
@@ -14,12 +16,21 @@ import (
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
"modernc.org/libc/wctype"
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x86_64/ksigaction.h
//
// struct k_sigaction {
@@ -65,6 +76,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -89,61 +103,73 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
- // // if dmesgs {
- // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // // }
- // t.setErrno(err)
- // return -1
- // }
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ if err := syscall.Lstat(GoString(pathname), (*syscall.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
- // // if dmesgs {
- // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
- // // }
- // return 0
+ // 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 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
- // // if dmesgs {
- // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // // }
- // t.setErrno(err)
- // return -1
- // }
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ if err := syscall.Stat(GoString(pathname), (*syscall.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
- // // if dmesgs {
- // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
- // // }
- // return 0
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
+ return 0
}
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
- // // if dmesgs {
- // // dmesg("%v: fd %d: %v", origin(1), fd, err)
- // // }
- // t.setErrno(err)
- // return -1
- // }
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
+ if err := syscall.Fstat(int(fd), (*syscall.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
+ // if dmesgs {
+ // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
- // // if dmesgs {
- // // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
- // // }
- // return 0
+ // if dmesgs {
+ // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
+ // }
+ return 0
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
// if dmesgs {
@@ -161,6 +187,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -182,6 +211,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -198,6 +230,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
@@ -215,6 +250,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -226,6 +264,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -237,6 +278,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
// if err != 0 {
@@ -252,6 +296,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -263,6 +310,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -277,6 +327,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
// t.setErrno(err)
@@ -291,6 +344,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -305,6 +361,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -319,37 +378,41 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
- // t.setErrno(err)
- // return -1
- // }
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
+ if err := syscall.Unlink(GoString(pathname)); err != nil {
+ t.setErrno(err)
+ return -1
+ }
- // // if dmesgs {
- // // dmesg("%v: %q: ok", origin(1), GoString(pathname))
- // // }
- // return 0
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
+ return 0
}
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
- // // if dmesgs {
- // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // // }
- // t.setErrno(err)
- // return -1
- // }
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if err := syscall.Access(GoString(pathname), uint32(mode)); err != nil {
+ t.setErrno(err)
+ return -1
+ }
- // // if dmesgs {
- // // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- // // }
- // return 0
+ // if dmesgs {
+ // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // }
+ return 0
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +427,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -375,6 +441,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -386,6 +455,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
panic(todo(""))
// // if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
// // t.setErrno(err)
@@ -397,6 +469,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -408,6 +483,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
// t.setErrno(err)
@@ -419,6 +497,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -431,6 +512,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
// if err != 0 {
@@ -443,6 +527,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -478,16 +565,25 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -496,3 +592,188 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// return 0
}
+
+func AtomicLoadPInt8(addr uintptr) (val int8) {
+ return int8(a_load_8(addr))
+}
+
+func AtomicLoadPInt16(addr uintptr) (val int16) {
+ return int16(a_load_16(addr))
+}
+
+func AtomicLoadPUint8(addr uintptr) byte {
+ return byte(a_load_8(addr))
+}
+
+func AtomicLoadPUint16(addr uintptr) uint16 {
+ return uint16(a_load_16(addr))
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux_mips64le.go b/vendor/modernc.org/libc/libc_linux_mips64le.go
new file mode 100644
index 000000000..16631d5c9
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_linux_mips64le.go
@@ -0,0 +1,760 @@
+// 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 libc // import "modernc.org/libc"
+
+import (
+ "os"
+ "strings"
+ gotime "time"
+ "unicode"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+ "modernc.org/libc/errno"
+ "modernc.org/libc/fcntl"
+ "modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
+ "modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
+ "modernc.org/libc/wctype"
+)
+
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
+// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
+func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
+ // musl/arch/x86_64/ksigaction.h
+ //
+ // struct k_sigaction {
+ // void (*handler)(int);
+ // unsigned long flags;
+ // void (*restorer)(void);
+ // unsigned mask[2];
+ // };
+ type k_sigaction struct {
+ handler uintptr
+ flags ulong
+ restorer uintptr
+ mask [2]uint32
+ }
+
+ var kact, koldact uintptr
+ if act != 0 {
+ sz := int(unsafe.Sizeof(k_sigaction{}))
+ kact = t.Alloc(sz)
+ defer t.Free(sz)
+ *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{
+ handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler,
+ flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags),
+ restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer,
+ }
+ Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask)))
+ }
+ if oldact != 0 {
+ panic(todo(""))
+ }
+
+ if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ if oldact != 0 {
+ panic(todo(""))
+ }
+
+ return 0
+}
+
+// int fcntl(int fd, int cmd, ... /* arg */ );
+func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
+ var arg uintptr
+ if args != 0 {
+ arg = *(*uintptr)(unsafe.Pointer(args))
+ }
+ if cmd == fcntl.F_SETFL {
+ arg |= unix.O_LARGEFILE
+ }
+ 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 lstat(const char *pathname, struct stat *statbuf);
+func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", 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 __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
+ return 0
+}
+
+// int fstat(int fd, struct stat *statbuf);
+func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
+ // if dmesgs {
+ // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf)))
+ // }
+ return 0
+}
+
+func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
+ return Xmmap64(t, addr, length, prot, flags, fd, offset)
+}
+
+// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
+ data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
+ if err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %v", origin(1), err)
+ // }
+ t.setErrno(err)
+ return ^uintptr(0) // (void*)-1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %#x", origin(1), data)
+ // }
+ return data
+}
+
+// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
+func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
+ var arg uintptr
+ if args != 0 {
+ arg = *(*uintptr)(unsafe.Pointer(args))
+ }
+ data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0)
+ if err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %v", origin(1), err)
+ // }
+ t.setErrno(err)
+ return ^uintptr(0) // (void*)-1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %#x", origin(1), data)
+ // }
+ return data
+}
+
+// int ftruncate(int fd, off_t length);
+func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
+ // if dmesgs {
+ // dmesg("%v: fd %d: %v", origin(1), fd, err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %d %#x: ok", origin(1), fd, length)
+ // }
+ 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
+ n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ if err != 0 {
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n)
+ // }
+ return types.Off_t(n)
+}
+
+// int utime(const char *filename, const struct utimbuf *times);
+func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// unsigned int alarm(unsigned int seconds);
+func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
+ n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
+ if err != 0 {
+ panic(todo(""))
+ }
+
+ return uint32(n)
+}
+
+// time_t time(time_t *tloc);
+func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
+ n := gotime.Now().UTC().Unix()
+ if tloc != 0 {
+ *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
+ }
+ return types.Time_t(n)
+}
+
+// int getrlimit(int resource, struct rlimit *rlim);
+func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// int mkdir(const char *path, mode_t mode);
+func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(path))
+ // }
+ return 0
+}
+
+// int symlink(const char *target, const char *linkpath);
+func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath))
+ // }
+ return 0
+}
+
+// int chmod(const char *pathname, mode_t mode)
+func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // }
+ return 0
+}
+
+// int utimes(const char *filename, const struct timeval times[2]);
+func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(filename))
+ // }
+ return 0
+}
+
+// int unlink(const char *pathname);
+func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
+ return 0
+}
+
+// int access(const char *pathname, int mode);
+func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
+ // if dmesgs {
+ // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
+ // }
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
+ // }
+ return 0
+}
+
+// int rmdir(const char *pathname);
+func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ // if dmesgs {
+ // dmesg("%v: %q: ok", origin(1), GoString(pathname))
+ // }
+ return 0
+}
+
+// int rename(const char *oldpath, const char *newpath);
+func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
+ t.setErrno(err)
+ return -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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
+ t.setErrno(err)
+ return -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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
+ 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 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// int pipe(int pipefd[2]);
+func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+// int dup2(int oldfd, int newfd);
+func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
+ n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+ if err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return int32(n)
+}
+
+// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
+ n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
+ if err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return types.Ssize_t(n)
+}
+
+// FILE *fopen64(const char *pathname, const char *mode);
+func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
+ m := strings.ReplaceAll(GoString(mode), "b", "")
+ var flags int
+ switch m {
+ case "r":
+ flags = os.O_RDONLY
+ case "r+":
+ flags = os.O_RDWR
+ case "w":
+ flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC
+ case "w+":
+ flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC
+ case "a":
+ flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND
+ case "a+":
+ flags = os.O_RDWR | os.O_CREATE | os.O_APPEND
+ default:
+ panic(m)
+ }
+ //TODO- flags |= fcntl.O_LARGEFILE
+ fd, _, err := unix.Syscall(unix.SYS_OPEN, pathname, uintptr(flags|unix.O_LARGEFILE), 0666)
+ if err != 0 {
+ t.setErrno(err)
+ return 0
+ }
+
+ if p := newFile(t, int32(fd)); p != 0 {
+ return p
+ }
+
+ Xclose(t, int32(fd))
+ t.setErrno(errno.ENOMEM)
+ return 0
+}
+
+// int iswspace(wint_t wc);
+func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
+ return Bool32(unicode.IsSpace(rune(wc)))
+}
+
+// int iswalnum(wint_t wc);
+func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
+ return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
+}
+
+// int setrlimit(int resource, const struct rlimit *rlim);
+func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
+ if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
+}
+
+func AtomicLoadPInt8(addr uintptr) (val int8) {
+ return int8(a_load_8(addr))
+}
+
+func AtomicLoadPInt16(addr uintptr) (val int16) {
+ return int16(a_load_16(addr))
+}
+
+func AtomicLoadPUint8(addr uintptr) byte {
+ return byte(a_load_8(addr))
+}
+
+func AtomicLoadPUint16(addr uintptr) uint16 {
+ return uint16(a_load_16(addr))
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux_ppc64le.go b/vendor/modernc.org/libc/libc_linux_ppc64le.go
index d23be04f4..5cfdc3029 100644
--- a/vendor/modernc.org/libc/libc_linux_ppc64le.go
+++ b/vendor/modernc.org/libc/libc_linux_ppc64le.go
@@ -7,6 +7,7 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
+ gotime "time"
"unicode"
"unsafe"
@@ -14,12 +15,21 @@ import (
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
"modernc.org/libc/wctype"
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x86_64/ksigaction.h
//
// struct k_sigaction {
@@ -65,6 +75,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -97,6 +110,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -113,6 +129,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -129,6 +148,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -144,11 +166,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
// if dmesgs {
@@ -166,6 +194,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -187,6 +218,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -203,6 +237,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
@@ -220,6 +257,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -230,6 +270,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
if err != 0 {
panic(todo(""))
@@ -240,6 +283,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -254,6 +300,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -264,6 +313,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -277,6 +329,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -290,6 +345,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -303,6 +361,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -316,6 +377,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -329,6 +393,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -345,6 +412,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -358,6 +428,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -368,6 +441,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
t.setErrno(err)
return -1
@@ -378,6 +454,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -388,6 +467,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -398,6 +480,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -408,6 +493,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if err != 0 {
t.setErrno(err)
@@ -419,6 +507,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
if err != 0 {
t.setErrno(err)
@@ -430,6 +521,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -466,11 +560,17 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
@@ -488,6 +588,9 @@ func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -495,3 +598,172 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_linux_riscv64.go b/vendor/modernc.org/libc/libc_linux_riscv64.go
index e49c0f44d..21f65d62e 100644
--- a/vendor/modernc.org/libc/libc_linux_riscv64.go
+++ b/vendor/modernc.org/libc/libc_linux_riscv64.go
@@ -7,6 +7,7 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
+ gotime "time"
"unicode"
"unsafe"
@@ -14,13 +15,22 @@ import (
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
"modernc.org/libc/utime"
"modernc.org/libc/wctype"
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/arch/x86_64/ksigaction.h
//
// struct k_sigaction {
@@ -66,6 +76,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -90,6 +103,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags);
func Xfstatat(t *TLS, dirfd int32, pathname, statbuf uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirfd=%v statbuf=%v flags=%v, (%v:)", t, dirfd, statbuf, flags, origin(2))
+ }
// From golang.org/x/sys/unix/zsyscall_linux_riscv64.go
if _, _, err := unix.Syscall6(unix.SYS_FSTATAT, uintptr(dirfd), pathname, statbuf, uintptr(flags), 0, 0); err != 0 {
t.setErrno(err)
@@ -101,18 +117,27 @@ func Xfstatat(t *TLS, dirfd int32, pathname, statbuf uintptr, flags int32) int32
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux_riscv64.go
return Xfstatat(t, unix.AT_FDCWD, pathname, statbuf, unix.AT_SYMLINK_NOFOLLOW)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux_riscv64.go
return Xfstatat(t, unix.AT_FDCWD, pathname, statbuf, 0)
}
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -128,11 +153,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
// if dmesgs {
@@ -150,6 +181,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -171,6 +205,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -187,6 +224,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
@@ -218,6 +258,9 @@ type utimbuf struct {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if times == 0 {
return Xutimes(t, filename, 0)
}
@@ -234,6 +277,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// No alarm syscall on linux/riscv64. And cannot implement with setitimer as in musl,
// because of missing defination to constant ITIMER_REAL in types_linux_riscv64.go.
@@ -241,6 +287,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux_riscv64.go
var tv types.Timeval
if err := Xgettimeofday(t, uintptr(unsafe.Pointer(&tv)), 0); err != 0 {
@@ -256,6 +305,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -266,95 +318,143 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xmkdirat(t, unix.AT_FDCWD, path, mode)
}
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xsymlinkat(t, target, unix.AT_FDCWD, linkpath)
}
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xfchmodat(t, unix.AT_FDCWD, pathname, mode, 0)
}
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
return Xutimensat(t, unix.AT_FDCWD, filename, times, 0)
}
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xunlinkat(t, unix.AT_FDCWD, pathname, 0)
}
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xfaccessat(t, unix.AT_FDCWD, pathname, mode, 0)
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xunlinkat(t, unix.AT_FDCWD, pathname, unix.AT_REMOVEDIR)
}
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xrenameat(t, unix.AT_FDCWD, oldpath, unix.AT_FDCWD, newpath)
}
// int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
func Xrenameat(t *TLS, olddirfd int32, oldpath uintptr, newdirfd int32, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v olddirfd=%v oldpath=%v newdirfd=%v newpath=%v, (%v:)", t, olddirfd, oldpath, newdirfd, newpath, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux_riscv64.go
return Xrenameat2(t, olddirfd, oldpath, newdirfd, newpath, 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xmknodat(t, unix.AT_FDCWD, pathname, mode, dev)
}
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xfchownat(t, unix.AT_FDCWD, pathname, owner, group, 0)
}
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xlinkat(t, unix.AT_FDCWD, oldpath, unix.AT_FDCWD, newpath, 0)
}
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xpipe2(t, pipefd, 0)
}
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xdup3(t, oldfd, newfd, 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
// From golang.org/x/sys/unix/syscall_linux.go
return Xreadlinkat(t, unix.AT_FDCWD, path, buf, bufsize)
}
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -392,11 +492,17 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int iswspace(wint_t wc);
func Xiswspace(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsSpace(rune(wc)))
}
// int iswalnum(wint_t wc);
func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v wc=%v, (%v:)", t, wc, origin(2))
+ }
return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc)))
}
@@ -414,6 +520,9 @@ func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -421,3 +530,183 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
+
+const __NFDBITS = 64
+
+func X__fdelt_chk(tls *TLS, d int64) (r int64) {
+ if __ccgo_strace {
+ trc("tls=%v d=%v, (%v:)", tls, d, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+
+ return d / __NFDBITS
+}
diff --git a/vendor/modernc.org/libc/libc_linux_s390x.go b/vendor/modernc.org/libc/libc_linux_s390x.go
index d5a0aa6e9..5697f6460 100644
--- a/vendor/modernc.org/libc/libc_linux_s390x.go
+++ b/vendor/modernc.org/libc/libc_linux_s390x.go
@@ -7,17 +7,27 @@ package libc // import "modernc.org/libc"
import (
"os"
"strings"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/signal"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
+ "modernc.org/libc/time"
+)
+
+var (
+ startTime = gotime.Now() // For clock(3)
)
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
// musl/src/internal/ksigaction.h
// struct k_sigaction {
// void (*handler)(int);
@@ -62,6 +72,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -86,6 +99,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -102,6 +118,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -118,6 +137,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -133,11 +155,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
// https://github.com/golang/go/blob/7d822af4500831d131562f17dcf53374469d823e/src/syscall/syscall_linux_s390x.go#L77
args := [6]uintptr{addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
data, _, err := unix.Syscall(unix.SYS_MMAP, uintptr(unsafe.Pointer(&args[0])), 0, 0)
@@ -157,6 +185,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -178,6 +209,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
// dmesg("%v: fd %d: %v", origin(1), fd, err)
@@ -194,6 +228,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
if err != 0 {
// if dmesgs {
@@ -211,6 +248,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -221,6 +261,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
if err != 0 {
panic(todo(""))
@@ -231,6 +274,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
n, err := unix.Time((*unix.Time_t)(unsafe.Pointer(tloc)))
if err != nil {
t.setErrno(err)
@@ -242,6 +288,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -252,6 +301,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -265,6 +317,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -278,6 +333,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -291,6 +349,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
t.setErrno(err)
return -1
@@ -304,6 +365,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -317,6 +381,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
// if dmesgs {
// dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -333,6 +400,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -346,6 +416,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -356,6 +429,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
t.setErrno(err)
return -1
@@ -366,6 +442,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -376,6 +455,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
t.setErrno(err)
return -1
@@ -386,6 +468,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -396,6 +481,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if err != 0 {
t.setErrno(err)
@@ -407,6 +495,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
if err != 0 {
t.setErrno(err)
@@ -418,6 +509,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -467,6 +561,9 @@ func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -474,3 +571,172 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
return 0
}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+var _table1 = [384]int32{
+ 129: int32(1),
+ 130: int32(2),
+ 131: int32(3),
+ 132: int32(4),
+ 133: int32(5),
+ 134: int32(6),
+ 135: int32(7),
+ 136: int32(8),
+ 137: int32(9),
+ 138: int32(10),
+ 139: int32(11),
+ 140: int32(12),
+ 141: int32(13),
+ 142: int32(14),
+ 143: int32(15),
+ 144: int32(16),
+ 145: int32(17),
+ 146: int32(18),
+ 147: int32(19),
+ 148: int32(20),
+ 149: int32(21),
+ 150: int32(22),
+ 151: int32(23),
+ 152: int32(24),
+ 153: int32(25),
+ 154: int32(26),
+ 155: int32(27),
+ 156: int32(28),
+ 157: int32(29),
+ 158: int32(30),
+ 159: int32(31),
+ 160: int32(32),
+ 161: int32(33),
+ 162: int32(34),
+ 163: int32(35),
+ 164: int32(36),
+ 165: int32(37),
+ 166: int32(38),
+ 167: int32(39),
+ 168: int32(40),
+ 169: int32(41),
+ 170: int32(42),
+ 171: int32(43),
+ 172: int32(44),
+ 173: int32(45),
+ 174: int32(46),
+ 175: int32(47),
+ 176: int32(48),
+ 177: int32(49),
+ 178: int32(50),
+ 179: int32(51),
+ 180: int32(52),
+ 181: int32(53),
+ 182: int32(54),
+ 183: int32(55),
+ 184: int32(56),
+ 185: int32(57),
+ 186: int32(58),
+ 187: int32(59),
+ 188: int32(60),
+ 189: int32(61),
+ 190: int32(62),
+ 191: int32(63),
+ 192: int32(64),
+ 193: int32('a'),
+ 194: int32('b'),
+ 195: int32('c'),
+ 196: int32('d'),
+ 197: int32('e'),
+ 198: int32('f'),
+ 199: int32('g'),
+ 200: int32('h'),
+ 201: int32('i'),
+ 202: int32('j'),
+ 203: int32('k'),
+ 204: int32('l'),
+ 205: int32('m'),
+ 206: int32('n'),
+ 207: int32('o'),
+ 208: int32('p'),
+ 209: int32('q'),
+ 210: int32('r'),
+ 211: int32('s'),
+ 212: int32('t'),
+ 213: int32('u'),
+ 214: int32('v'),
+ 215: int32('w'),
+ 216: int32('x'),
+ 217: int32('y'),
+ 218: int32('z'),
+ 219: int32(91),
+ 220: int32(92),
+ 221: int32(93),
+ 222: int32(94),
+ 223: int32(95),
+ 224: int32(96),
+ 225: int32('a'),
+ 226: int32('b'),
+ 227: int32('c'),
+ 228: int32('d'),
+ 229: int32('e'),
+ 230: int32('f'),
+ 231: int32('g'),
+ 232: int32('h'),
+ 233: int32('i'),
+ 234: int32('j'),
+ 235: int32('k'),
+ 236: int32('l'),
+ 237: int32('m'),
+ 238: int32('n'),
+ 239: int32('o'),
+ 240: int32('p'),
+ 241: int32('q'),
+ 242: int32('r'),
+ 243: int32('s'),
+ 244: int32('t'),
+ 245: int32('u'),
+ 246: int32('v'),
+ 247: int32('w'),
+ 248: int32('x'),
+ 249: int32('y'),
+ 250: int32('z'),
+ 251: int32(123),
+ 252: int32(124),
+ 253: int32(125),
+ 254: int32(126),
+ 255: int32(127),
+}
+
+var _ptable1 = uintptr(unsafe.Pointer(&_table1)) + uintptr(128)*4
+
+func X__ctype_tolower_loc(tls *TLS) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return uintptr(unsafe.Pointer(&_ptable1))
+}
+
+type Tin6_addr = struct {
+ F__in6_union struct {
+ F__s6_addr16 [0][8]uint16
+ F__s6_addr32 [0][4]uint32
+ F__s6_addr [16]uint8
+ }
+}
+
+var Xin6addr_any = Tin6_addr{}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_loong64.go b/vendor/modernc.org/libc/libc_loong64.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_loong64.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_mips64le.go b/vendor/modernc.org/libc/libc_mips64le.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_mips64le.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_netbsd.go b/vendor/modernc.org/libc/libc_netbsd.go
index f4ed268fb..9a152d8d3 100644
--- a/vendor/modernc.org/libc/libc_netbsd.go
+++ b/vendor/modernc.org/libc/libc_netbsd.go
@@ -79,6 +79,9 @@ var X_ThreadRuneLocale uintptr //TODO initialize and implement _Thread_local sem
// include/xlocale/_ctype.h:54:_RuneLocale *__runes_for_locale(locale_t, int*);
func X__runes_for_locale(t *TLS, l locale_t, p uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v l=%v p=%v, (%v:)", t, l, p, origin(2))
+ }
panic(todo(""))
}
@@ -142,23 +145,35 @@ func fwrite(fd int32, b []byte) (int, error) {
// unsigned long ___runetype(__ct_rune_t) __pure;
func X___runetype(t *TLS, x int32) ulong {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
panic(todo(""))
}
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args))
return int32(n)
}
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
gotime.Sleep(gotime.Microsecond * gotime.Duration(usec))
return 0
}
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
t.setErrno(err)
return -1
@@ -169,6 +184,9 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int fgetc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file)
var buf [1]byte
if n, _ := unix.Read(fd, buf[:]); n != 0 {
@@ -180,16 +198,25 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -239,11 +266,17 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
return Xopen64(t, pathname, flags, args)
}
// int open(const char *pathname, int flags, ...);
func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
@@ -266,6 +299,9 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -277,6 +313,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if noFsync {
// Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
@@ -295,6 +334,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
switch name {
case unistd.X_SC_PAGESIZE:
return long(unix.Getpagesize())
@@ -311,6 +353,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -324,6 +369,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -340,11 +388,17 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if err := unix.Ftruncate(int(fd), int64(length)); err != nil {
if dmesgs {
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
@@ -361,11 +415,17 @@ func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
// ssize_t read(int fd, void *buf, size_t count);
func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count))
if err != 0 {
t.setErrno(err)
@@ -381,6 +441,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// ssize_t write(int fd, const void *buf, size_t count);
func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
const retry = 5
var err syscall.Errno
for i := 0; i < retry; i++ {
@@ -406,6 +469,9 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -419,6 +485,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int fchown(int fd, uid_t owner, gid_t group);
func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -429,12 +498,18 @@ func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
// uid_t geteuid(void);
func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0)
return types.Uid_t(n)
}
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
t.setErrno(err)
return -1
@@ -445,6 +520,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
if tz != 0 {
panic(todo(""))
}
@@ -462,6 +540,9 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
t.setErrno(err)
return -1
@@ -472,6 +553,9 @@ func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) i
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
t.setErrno(err)
return -1
@@ -482,6 +566,9 @@ func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen so
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
var argp uintptr
if va != 0 {
argp = VaUintptr(&va)
@@ -497,6 +584,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 {
// if dmesgs {
// dmesg("%v: fd %v: %v", origin(1), sockfd, err)
@@ -510,6 +600,9 @@ func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
n, err := unix.Select(
int(nfds),
(*unix.FdSet)(unsafe.Pointer(readfds)),
@@ -527,17 +620,31 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
}
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
return types.Mode_t(n)
}
// int execvp(const char *file, char *const argv[]);
func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
t.setErrno(err)
return -1
@@ -548,6 +655,9 @@ func Xexecvp(t *TLS, file, argv uintptr) int32 {
// pid_t waitpid(pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -559,6 +669,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -575,6 +688,9 @@ func Xuname(t *TLS, buf uintptr) int32 {
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -586,6 +702,9 @@ func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -597,6 +716,9 @@ func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// int shutdown(int sockfd, int how);
func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
t.setErrno(err)
return -1
@@ -607,6 +729,9 @@ func Xshutdown(t *TLS, sockfd, how int32) int32 {
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -617,6 +742,9 @@ func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int socket(int domain, int type, int protocol);
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
if err != 0 {
t.setErrno(err)
@@ -628,6 +756,9 @@ func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
if err != 0 {
t.setErrno(err)
@@ -639,6 +770,9 @@ func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -649,6 +783,9 @@ func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int listen(int sockfd, int backlog);
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
t.setErrno(err)
return -1
@@ -659,6 +796,9 @@ func Xlisten(t *TLS, sockfd, backlog int32) int32 {
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
// if err != 0 {
@@ -671,16 +811,25 @@ func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xgetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xsetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -691,16 +840,25 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// uid_t getuid(void);
func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return types.Uid_t(os.Getuid())
}
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(os.Getpid())
}
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -720,26 +878,41 @@ func Xsystem(t *TLS, command uintptr) int32 {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
// int backtrace(void **buffer, int size);
func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
panic(todo(""))
}
// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
panic(todo(""))
}
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -773,11 +946,17 @@ func (f *ftstream) close(t *TLS) {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
return Xfts64_open(t, path_argv, options, compar)
}
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
f := &ftstream{}
var walk func(string)
@@ -882,11 +1061,17 @@ func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintp
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_read(t, ftsp)
}
// FTSENT *fts_read(FTS *ftsp);
func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
t.setErrno(0)
@@ -903,11 +1088,17 @@ func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_close(t, ftsp)
}
// int fts_close(FTS *ftsp);
func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
getObject(ftsp).(*ftstream).close(t)
removeObject(ftsp)
return 0
@@ -915,6 +1106,9 @@ func Xfts64_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
@@ -922,6 +1116,9 @@ var strerrorBuf [100]byte
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
if dmesgs {
dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
}
@@ -931,31 +1128,49 @@ func Xstrerror(t *TLS, errnum int32) uintptr {
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo(""))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -963,37 +1178,58 @@ var gai_strerrorBuf [100]byte
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
return uintptr(unsafe.Pointer(&gai_strerrorBuf))
}
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
// speed_t cfgetospeed(const struct termios *termios_p);
func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
panic(todo(""))
}
// int cfsetospeed(struct termios *termios_p, speed_t speed);
func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// int cfsetispeed(struct termios *termios_p, speed_t speed);
func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
t.setErrno(errno.ENOSYS)
return -1
}
@@ -1002,21 +1238,33 @@ var emptyStr = [1]byte{}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// char *nl_langinfo(nl_item item);
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1043,21 +1291,25 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
return resolved_path
}
-// struct tm *gmtime_r(const time_t *timep, struct tm *result);
-func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
- panic(todo(""))
-}
-
// char *inet_ntoa(struct in_addr in);
func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uintptr(unsafe.Pointer(&in6_addr_any))
}
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo("")) //TODO
// if dmesgs {
// dmesg("%v:", origin(1))
@@ -1076,11 +1328,17 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return 0 //TODO
}
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_READ, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1096,6 +1354,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1111,11 +1372,17 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return file(stream).close(t)
}
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -1125,6 +1392,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
@@ -1141,6 +1411,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
if n < 0 {
file(stream).setErr()
@@ -1155,21 +1428,33 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Bool32(file(stream).err())
}
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
panic(todo(""))
}
// int fscanf(FILE *stream, const char *format, ...);
func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
panic(todo(""))
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
return -1
}
@@ -1181,6 +1466,9 @@ var getservbynameStaticResult netdb.Servent
// struct servent *getservbyname(const char *name, const char *proto);
func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
var protoent *gonetdb.Protoent
if proto != 0 {
protoent = gonetdb.GetProtoByName(GoString(proto))
@@ -1258,6 +1546,9 @@ func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
}
func Xreaddir64(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
return Xreaddir(t, dir)
}
@@ -1270,14 +1561,23 @@ func __syscall(r, _ uintptr, errno syscall.Errno) long {
}
func X__syscall1(t *TLS, trap, p1 long) long {
+ if __ccgo_strace {
+ trc("t=%v p1=%v, (%v:)", t, p1, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0))
}
func X__syscall3(t *TLS, trap, p1, p2, p3 long) long {
+ if __ccgo_strace {
+ trc("t=%v p3=%v, (%v:)", t, p3, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3)))
}
func X__syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
+ if __ccgo_strace {
+ trc("t=%v p4=%v, (%v:)", t, p4, origin(2))
+ }
return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0))
}
@@ -1300,26 +1600,41 @@ func fcntlCmdStr(cmd int32) string {
// int setenv(const char *name, const char *value, int overwrite);
func Xsetenv(t *TLS, name, value uintptr, overwrite int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v value=%v overwrite=%v, (%v:)", t, value, overwrite, origin(2))
+ }
panic(todo(""))
}
// int unsetenv(const char *name);
func Xunsetenv(t *TLS, name uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
panic(todo(""))
}
// int pause(void);
func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
panic(todo(""))
}
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := Xsscanf(t, str, format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1329,20 +1644,32 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// void __assert(const char * func, const char * file, int line, const char *expr) __dead2;
func X__assert(t *TLS, fn, file uintptr, line int32, expr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v expr=%v, (%v:)", t, file, line, expr, origin(2))
+ }
X__assert_fail(t, expr, file, uint32(line), fn)
}
func X__assert13(t *TLS, file uintptr, line int32, fn, msg uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v msg=%v, (%v:)", t, file, line, msg, origin(2))
+ }
X__assert_fail(t, msg, file, uint32(line), fn)
}
// include/stdio.h:456:int __swbuf(int, FILE *);
func X__swbuf(t *TLS, n int32, file uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v file=%v, (%v:)", t, n, file, origin(2))
+ }
return Xfputc(t, n, file) //TODO improve performance, use a real buffer.
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1359,6 +1686,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// struct dirent *readdir(DIR *dirp);
func Xreaddir(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
if (*darwinDir)(unsafe.Pointer(dir)).eof {
return 0
}
@@ -1397,6 +1727,9 @@ type darwinDir struct {
// int sscanf(const char *str, const char *format, ...);
func Xsscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1406,10 +1739,16 @@ func Xsscanf(t *TLS, str, format, va uintptr) int32 {
// int * __error(void);
func X__error(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
func Xclosedir(t *TLS, dir uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
r := Xclose(t, int32((*darwinDir)(unsafe.Pointer(dir)).fd))
Xfree(t, dir)
return r
@@ -1417,11 +1756,17 @@ func Xclosedir(t *TLS, dir uintptr) int32 {
// int __xuname(int namesize, void *namebuf)
func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v namesize=%v namebuf=%v, (%v:)", t, namesize, namebuf, origin(2))
+ }
return Xuname(t, namebuf)
}
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1438,6 +1783,9 @@ func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
var a [2]int
if err := syscall.Pipe(a[:]); err != nil {
if dmesgs {
@@ -1456,10 +1804,16 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// char *inet_ntoa(struct in_addr in);
func X__inet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
// Cannot avoid the syscall here, addr sometimes matter.
data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
if err != 0 {
@@ -1477,27 +1831,45 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off
}
func X__errno(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return X__errno_location(t)
}
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return (*(*int32)(unsafe.Pointer((m /* &.__u */ /* &.__i */))) & 15)
}
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
return 0
}
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -1506,15 +1878,24 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
@@ -1524,6 +1905,9 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth
// int uuid_parse( char *in, uuid_t uu);
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
r, err := guuid.Parse(GoString(in))
if err != nil {
return -1
@@ -1533,19 +1917,33 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
return 0
}
-func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) }
+func X__srget(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return Xgetc(t, stream)
+}
// uint16_t __builtin_bswap16 (uint32_t x)
func Xbswap16(t *TLS, x uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap16(t, x)
}
// uint32_t __builtin_bswap32 (uint32_t x)
func Xbswap32(t *TLS, x uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap32(t, x)
}
// uint64_t __builtin_bswap64 (uint64_t x)
func Xbswap64(t *TLS, x uint64) uint64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
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 c418ad4fd..7c4026fa0 100644
--- a/vendor/modernc.org/libc/libc_netbsd_amd64.go
+++ b/vendor/modernc.org/libc/libc_netbsd_amd64.go
@@ -24,6 +24,9 @@ type (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
// t.setErrno(err)
@@ -35,6 +38,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -74,6 +80,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -90,6 +99,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -106,6 +118,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -122,6 +137,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -138,6 +156,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -154,6 +175,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -178,6 +202,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -194,6 +221,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -210,6 +240,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -220,6 +253,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -242,6 +278,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -258,6 +297,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -274,6 +316,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -295,6 +340,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -311,6 +359,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -322,6 +373,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -344,6 +398,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -354,6 +411,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -365,6 +425,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -377,6 +440,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -388,6 +454,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// 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 socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -487,6 +556,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -574,6 +646,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -608,6 +683,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
diff --git a/vendor/modernc.org/libc/libc_netbsd_arm.go b/vendor/modernc.org/libc/libc_netbsd_arm.go
index 7f10ac9c4..1a4ebd2f3 100644
--- a/vendor/modernc.org/libc/libc_netbsd_arm.go
+++ b/vendor/modernc.org/libc/libc_netbsd_arm.go
@@ -24,6 +24,9 @@ type (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
// t.setErrno(err)
@@ -35,6 +38,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -74,6 +80,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -90,6 +99,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -106,6 +118,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -122,6 +137,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -138,6 +156,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -154,6 +175,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -178,6 +202,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -194,6 +221,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -210,6 +240,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -220,6 +253,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -242,6 +278,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -258,6 +297,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -274,6 +316,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -295,6 +340,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -311,6 +359,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -322,6 +373,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -344,6 +398,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -354,6 +411,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -365,6 +425,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -377,6 +440,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -387,6 +453,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -486,6 +555,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -573,6 +645,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -607,6 +682,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
diff --git a/vendor/modernc.org/libc/libc_openbsd.go b/vendor/modernc.org/libc/libc_openbsd.go
index 767fddfef..e93c65bdf 100644
--- a/vendor/modernc.org/libc/libc_openbsd.go
+++ b/vendor/modernc.org/libc/libc_openbsd.go
@@ -79,6 +79,9 @@ var X_ThreadRuneLocale uintptr //TODO initialize and implement _Thread_local sem
// include/xlocale/_ctype.h:54:_RuneLocale *__runes_for_locale(locale_t, int*);
func X__runes_for_locale(t *TLS, l locale_t, p uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v l=%v p=%v, (%v:)", t, l, p, origin(2))
+ }
panic(todo(""))
}
@@ -142,23 +145,35 @@ func fwrite(fd int32, b []byte) (int, error) {
// unsigned long ___runetype(__ct_rune_t) __pure;
func X___runetype(t *TLS, x int32) ulong {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
panic(todo(""))
}
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
n, _ := fwrite(int32((*stdio.FILE)(unsafe.Pointer(stream)).F_file), printf(format, args))
return int32(n)
}
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
gotime.Sleep(gotime.Microsecond * gotime.Duration(usec))
return 0
}
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
t.setErrno(err)
return -1
@@ -169,6 +184,9 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int fgetc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_file)
var buf [1]byte
if n, _ := unix.Read(fd, buf[:]); n != 0 {
@@ -180,16 +198,25 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHDIR, path, 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -239,11 +266,17 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
return Xopen64(t, pathname, flags, args)
}
// int open(const char *pathname, int flags, ...);
func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
var mode types.Mode_t
if args != 0 {
mode = (types.Mode_t)(VaUint32(&args))
@@ -266,6 +299,9 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -277,6 +313,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if noFsync {
// Simulate -DSQLITE_NO_SYNC for sqlite3 testfixture, see function full_sync in sqlite3.c
return Xfstat(t, fd, uintptr(unsafe.Pointer(&fsyncStatbuf)))
@@ -295,6 +334,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
switch name {
case unistd.X_SC_PAGESIZE:
return long(unix.Getpagesize())
@@ -311,6 +353,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CLOSE, uintptr(fd), 0, 0); err != 0 {
t.setErrno(err)
return -1
@@ -324,6 +369,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
if _, err := unix.Getcwd((*RawMem)(unsafe.Pointer(buf))[:size:size]); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -340,11 +388,17 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
if err := unix.Ftruncate(int(fd), int64(length)); err != nil {
if dmesgs {
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
@@ -361,11 +415,17 @@ func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
// ssize_t read(int fd, void *buf, size_t count);
func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_READ, uintptr(fd), buf, uintptr(count))
if err != 0 {
t.setErrno(err)
@@ -381,6 +441,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// ssize_t write(int fd, const void *buf, size_t count);
func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
const retry = 5
var err syscall.Errno
for i := 0; i < retry; i++ {
@@ -406,6 +469,9 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t {
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
t.setErrno(err)
return -1
@@ -419,6 +485,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int fchown(int fd, uid_t owner, gid_t group);
func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v owner=%v group=%v, (%v:)", t, fd, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_FCHOWN, uintptr(fd), uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -429,12 +498,18 @@ func Xfchown(t *TLS, fd int32, owner types.Uid_t, group types.Gid_t) int32 {
// uid_t geteuid(void);
func Xgeteuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_GETEUID, 0, 0, 0)
return types.Uid_t(n)
}
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
t.setErrno(err)
return -1
@@ -445,6 +520,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
if tz != 0 {
panic(todo(""))
}
@@ -462,6 +540,9 @@ func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
// int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optlen=%v, (%v:)", t, optname, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_GETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, optlen, 0); err != 0 {
t.setErrno(err)
return -1
@@ -472,6 +553,9 @@ func Xgetsockopt(t *TLS, sockfd, level, optname int32, optval, optlen uintptr) i
// int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen socket.Socklen_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v optname=%v optval=%v optlen=%v, (%v:)", t, optname, optval, optlen, origin(2))
+ }
if _, _, err := unix.Syscall6(unix.SYS_SETSOCKOPT, uintptr(sockfd), uintptr(level), uintptr(optname), optval, uintptr(optlen), 0); err != 0 {
t.setErrno(err)
return -1
@@ -482,6 +566,9 @@ func Xsetsockopt(t *TLS, sockfd, level, optname int32, optval uintptr, optlen so
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
var argp uintptr
if va != 0 {
argp = VaUintptr(&va)
@@ -497,6 +584,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETSOCKNAME, uintptr(sockfd), addr, addrlen); err != 0 {
// if dmesgs {
// dmesg("%v: fd %v: %v", origin(1), sockfd, err)
@@ -510,6 +600,9 @@ func Xgetsockname(t *TLS, sockfd int32, addr, addrlen uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
n, err := unix.Select(
int(nfds),
(*unix.FdSet)(unsafe.Pointer(readfds)),
@@ -527,17 +620,31 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ if err := unix.Mkfifo(GoString(pathname), uint32(mode)); err != nil {
+ t.setErrno(err)
+ return -1
+ }
+
+ return 0
}
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
return types.Mode_t(n)
}
// int execvp(const char *file, char *const argv[]);
func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
t.setErrno(err)
return -1
@@ -548,6 +655,9 @@ func Xexecvp(t *TLS, file, argv uintptr) int32 {
// pid_t waitpid(pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -559,6 +669,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
if err := unix.Uname((*unix.Utsname)(unsafe.Pointer(buf))); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -575,6 +688,9 @@ func Xuname(t *TLS, buf uintptr) int32 {
// ssize_t recv(int sockfd, void *buf, size_t len, int flags);
func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_RECVFROM, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -586,6 +702,9 @@ func Xrecv(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// ssize_t send(int sockfd, const void *buf, size_t len, int flags);
func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v, (%v:)", t, sockfd, buf, len, flags, origin(2))
+ }
n, _, err := unix.Syscall6(unix.SYS_SENDTO, uintptr(sockfd), buf, uintptr(len), uintptr(flags), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -597,6 +716,9 @@ func Xsend(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32) typ
// int shutdown(int sockfd, int how);
func Xshutdown(t *TLS, sockfd, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v how=%v, (%v:)", t, how, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
t.setErrno(err)
return -1
@@ -607,6 +729,9 @@ func Xshutdown(t *TLS, sockfd, how int32) int32 {
// int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETPEERNAME, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -617,6 +742,9 @@ func Xgetpeername(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int socket(int domain, int type, int protocol);
func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_SOCKET, uintptr(domain), uintptr(type1), uintptr(protocol))
if err != 0 {
t.setErrno(err)
@@ -628,6 +756,9 @@ func Xsocket(t *TLS, domain, type1, protocol int32) int32 {
// int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
n, _, err := unix.Syscall(unix.SYS_BIND, uintptr(sockfd), addr, uintptr(addrlen))
if err != 0 {
t.setErrno(err)
@@ -639,6 +770,9 @@ func Xbind(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CONNECT, uintptr(sockfd), addr, uintptr(addrlen)); err != 0 {
t.setErrno(err)
return -1
@@ -649,6 +783,9 @@ func Xconnect(t *TLS, sockfd int32, addr uintptr, addrlen uint32) int32 {
// int listen(int sockfd, int backlog);
func Xlisten(t *TLS, sockfd, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v backlog=%v, (%v:)", t, backlog, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_LISTEN, uintptr(sockfd), uintptr(backlog), 0); err != 0 {
t.setErrno(err)
return -1
@@ -659,6 +796,9 @@ func Xlisten(t *TLS, sockfd, backlog int32) int32 {
// int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall6(unix.SYS_ACCEPT4, uintptr(sockfd), addr, uintptr(addrlen), 0, 0, 0)
// if err != 0 {
@@ -671,16 +811,25 @@ func Xaccept(t *TLS, sockfd int32, addr uintptr, addrlen uintptr) int32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xgetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xsetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -691,16 +840,25 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// uid_t getuid(void);
func Xgetuid(t *TLS) types.Uid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return types.Uid_t(os.Getuid())
}
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(os.Getpid())
}
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -720,26 +878,41 @@ func Xsystem(t *TLS, command uintptr) int32 {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
// int backtrace(void **buffer, int size);
func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
panic(todo(""))
}
// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
panic(todo(""))
}
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -773,11 +946,17 @@ func (f *ftstream) close(t *TLS) {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
return Xfts64_open(t, path_argv, options, compar)
}
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
f := &ftstream{}
var walk func(string)
@@ -882,11 +1061,17 @@ func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintp
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_read(t, ftsp)
}
// FTSENT *fts_read(FTS *ftsp);
func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
f := getObject(ftsp).(*ftstream)
if f.x == len(f.s) {
t.setErrno(0)
@@ -903,11 +1088,17 @@ func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_close(t, ftsp)
}
// int fts_close(FTS *ftsp);
func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
getObject(ftsp).(*ftstream).close(t)
removeObject(ftsp)
return 0
@@ -915,6 +1106,9 @@ func Xfts64_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
@@ -922,6 +1116,9 @@ var strerrorBuf [100]byte
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
if dmesgs {
dmesg("%v: %v\n%s", origin(1), errnum, debug.Stack())
}
@@ -931,31 +1128,49 @@ func Xstrerror(t *TLS, errnum int32) uintptr {
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo(""))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -963,37 +1178,58 @@ var gai_strerrorBuf [100]byte
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
return uintptr(unsafe.Pointer(&gai_strerrorBuf))
}
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
// speed_t cfgetospeed(const struct termios *termios_p);
func Xcfgetospeed(t *TLS, termios_p uintptr) termios.Speed_t {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v, (%v:)", t, termios_p, origin(2))
+ }
panic(todo(""))
}
// int cfsetospeed(struct termios *termios_p, speed_t speed);
func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// int cfsetispeed(struct termios *termios_p, speed_t speed);
func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
t.setErrno(errno.ENOSYS)
return -1
}
@@ -1002,21 +1238,33 @@ var emptyStr = [1]byte{}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// char *nl_langinfo(nl_item item);
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
+ if __ccgo_strace {
+ trc("t=%v item=%v, (%v:)", t, item, origin(2))
+ }
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
}
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1043,21 +1291,25 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
return resolved_path
}
-// struct tm *gmtime_r(const time_t *timep, struct tm *result);
-func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
- panic(todo(""))
-}
-
// char *inet_ntoa(struct in_addr in);
func Xinet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func X__ccgo_in6addr_anyp(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uintptr(unsafe.Pointer(&in6_addr_any))
}
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo("")) //TODO
// if dmesgs {
// dmesg("%v:", origin(1))
@@ -1076,11 +1328,17 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return 0 //TODO
}
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_READ, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1096,6 +1354,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
m, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), ptr, uintptr(size*nmemb))
if err != 0 {
file(stream).setErr()
@@ -1111,11 +1372,17 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return file(stream).close(t)
}
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
if _, err := fwrite(file(stream).fd(), []byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -1125,6 +1392,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
if n := Xlseek(t, int32(file(stream).fd()), types.Off_t(offset), whence); n < 0 {
// if dmesgs {
// dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), file(stream).fd(), offset, whenceStr(whence), n)
@@ -1141,6 +1411,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
n := Xlseek(t, file(stream).fd(), 0, stdio.SEEK_CUR)
if n < 0 {
file(stream).setErr()
@@ -1155,21 +1428,33 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
return Bool32(file(stream).err())
}
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
panic(todo(""))
}
// int fscanf(FILE *stream, const char *format, ...);
func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
panic(todo(""))
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_WRITE, uintptr(file(stream).fd()), s, uintptr(Xstrlen(t, s))); err != 0 {
return -1
}
@@ -1181,6 +1466,9 @@ var getservbynameStaticResult netdb.Servent
// struct servent *getservbyname(const char *name, const char *proto);
func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v proto=%v, (%v:)", t, proto, origin(2))
+ }
var protoent *gonetdb.Protoent
if proto != 0 {
protoent = gonetdb.GetProtoByName(GoString(proto))
@@ -1258,6 +1546,9 @@ func Xgetservbyname(t *TLS, name, proto uintptr) uintptr {
}
func Xreaddir64(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
return Xreaddir(t, dir)
}
@@ -1270,14 +1561,23 @@ func __syscall(r, _ uintptr, errno syscall.Errno) long {
}
func X__syscall1(t *TLS, trap, p1 long) long {
+ if __ccgo_strace {
+ trc("t=%v p1=%v, (%v:)", t, p1, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), 0, 0))
}
func X__syscall3(t *TLS, trap, p1, p2, p3 long) long {
+ if __ccgo_strace {
+ trc("t=%v p3=%v, (%v:)", t, p3, origin(2))
+ }
return __syscall(unix.Syscall(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3)))
}
func X__syscall4(t *TLS, trap, p1, p2, p3, p4 long) long {
+ if __ccgo_strace {
+ trc("t=%v p4=%v, (%v:)", t, p4, origin(2))
+ }
return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0))
}
@@ -1300,26 +1600,41 @@ func fcntlCmdStr(cmd int32) string {
// int setenv(const char *name, const char *value, int overwrite);
func Xsetenv(t *TLS, name, value uintptr, overwrite int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v value=%v overwrite=%v, (%v:)", t, value, overwrite, origin(2))
+ }
panic(todo(""))
}
// int unsetenv(const char *name);
func Xunsetenv(t *TLS, name uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
panic(todo(""))
}
// int pause(void);
func Xpause(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v iov=%v iovcnt=%v, (%v:)", t, fd, iov, iovcnt, origin(2))
+ }
panic(todo(""))
}
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := Xsscanf(t, str, format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1329,20 +1644,32 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// void __assert(const char * func, const char * file, int line, const char *expr) __dead2;
func X__assert(t *TLS, fn, file uintptr, line int32, expr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v expr=%v, (%v:)", t, file, line, expr, origin(2))
+ }
X__assert_fail(t, expr, file, uint32(line), fn)
}
func X__assert13(t *TLS, file uintptr, line int32, fn, msg uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v msg=%v, (%v:)", t, file, line, msg, origin(2))
+ }
X__assert_fail(t, msg, file, uint32(line), fn)
}
// include/stdio.h:456:int __swbuf(int, FILE *);
func X__swbuf(t *TLS, n int32, file uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v n=%v file=%v, (%v:)", t, n, file, origin(2))
+ }
return Xfputc(t, n, file) //TODO improve performance, use a real buffer.
}
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Rmdir(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1359,6 +1686,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// struct dirent *readdir(DIR *dirp);
func Xreaddir(t *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
if (*darwinDir)(unsafe.Pointer(dir)).eof {
return 0
}
@@ -1397,6 +1727,9 @@ type darwinDir struct {
// int sscanf(const char *str, const char *format, ...);
func Xsscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -1406,10 +1739,16 @@ func Xsscanf(t *TLS, str, format, va uintptr) int32 {
// int * __error(void);
func X__error(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
func Xclosedir(t *TLS, dir uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v dir=%v, (%v:)", t, dir, origin(2))
+ }
r := Xclose(t, int32((*darwinDir)(unsafe.Pointer(dir)).fd))
Xfree(t, dir)
return r
@@ -1417,11 +1756,17 @@ func Xclosedir(t *TLS, dir uintptr) int32 {
// int __xuname(int namesize, void *namebuf)
func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v namesize=%v namebuf=%v, (%v:)", t, namesize, namebuf, origin(2))
+ }
return Xuname(t, namebuf)
}
// int chflags(const char *path, u_int flags);
func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v flags=%v, (%v:)", t, path, flags, origin(2))
+ }
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -1438,6 +1783,9 @@ func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
var a [2]int
if err := syscall.Pipe(a[:]); err != nil {
if dmesgs {
@@ -1456,10 +1804,16 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// char *inet_ntoa(struct in_addr in);
func X__inet_ntoa(t *TLS, in1 in.In_addr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v in1=%v, (%v:)", t, in1, origin(2))
+ }
panic(todo(""))
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
// On 2021-12-23, a new syscall for mmap was introduced:
//
// 49 STD NOLOCK { void *sys_mmap(void *addr, size_t len, int prot, \
@@ -1485,27 +1839,45 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off
}
func X__errno(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return X__errno_location(t)
}
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return (*(*int32)(unsafe.Pointer((m /* &.__u */ /* &.__i */))) & 15)
}
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer((a /* &.__u */ /* &.__i */) + 6*4))
return 0
}
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -1514,15 +1886,24 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
@@ -1532,6 +1913,9 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth
// int uuid_parse( char *in, uuid_t uu);
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v in=%v uu=%v, (%v:)", t, in, uu, origin(2))
+ }
r, err := guuid.Parse(GoString(in))
if err != nil {
return -1
@@ -1541,16 +1925,27 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
return 0
}
-func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) }
+func X__srget(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
+ return Xgetc(t, stream)
+}
// void __assert2(const char *, int, const char *, const char *);
// __assert2(__FILE__, __LINE__, __func__, #e))
func X__assert2(t *TLS, file uintptr, line int32, fn, expr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v file=%v line=%v expr=%v, (%v:)", t, file, line, expr, origin(2))
+ }
X__assert_fail(t, expr, file, uint32(line), fn)
}
// int getpagesize(void);
func Xgetpagesize(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(unix.Getpagesize())
}
@@ -1568,6 +1963,9 @@ const PTHREAD_MUTEX_DEFAULT = 0
//
// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr);
func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
typ := PTHREAD_MUTEX_DEFAULT
if pAttr != 0 {
typ = int(X__ccgo_pthreadMutexattrGettype(t, pAttr))
@@ -1582,17 +1980,78 @@ func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 {
// uint16_t __builtin_bswap16 (uint32_t x)
func Xbswap16(t *TLS, x uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return X__builtin_bswap16(t, x)
+}
+
+func X__swap16md(t *TLS, x uint16) uint16 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap16(t, x)
}
// uint32_t __builtin_bswap32 (uint32_t x)
func Xbswap32(t *TLS, x uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap32(t, x)
}
// uint64_t __builtin_bswap64 (uint64_t x)
func Xbswap64(t *TLS, x uint64) uint64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
return X__builtin_bswap64(t, x)
}
-func X__builtin_isblank(t *TLS, _c int32) int32 { return Xisblank(t, _c) }
+func X__builtin_isblank(t *TLS, _c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v _c=%v, (%v:)", t, _c, origin(2))
+ }
+ return Xisblank(t, _c)
+}
+
+// int nanosleep(const struct timespec *req, struct timespec *rem);
+func Xnanosleep(t *TLS, req, rem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v rem=%v, (%v:)", t, rem, origin(2))
+ }
+ v := *(*time.Timespec)(unsafe.Pointer(req))
+ gotime.Sleep(gotime.Second*gotime.Duration(v.Ftv_sec) + gotime.Duration(v.Ftv_nsec))
+ return 0
+}
+
+// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
+func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
+ var n int
+ var err error
+ switch {
+ case count == 0:
+ n, err = unix.Pwrite(int(fd), nil, int64(offset))
+ default:
+ n, err = unix.Pwrite(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
+ // if dmesgs {
+ // dmesg("%v: fd %v, off %#x, count %#x\n%s", origin(1), fd, offset, count, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:count:count]))
+ // }
+ }
+ 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.Ssize_t(n)
+}
diff --git a/vendor/modernc.org/libc/libc_openbsd_386.go b/vendor/modernc.org/libc/libc_openbsd_386.go
index 8c30e7b5a..5b414c185 100644
--- a/vendor/modernc.org/libc/libc_openbsd_386.go
+++ b/vendor/modernc.org/libc/libc_openbsd_386.go
@@ -24,6 +24,9 @@ type (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
t.setErrno(err)
return -1
@@ -34,6 +37,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -73,6 +79,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -89,6 +98,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -105,6 +117,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -121,6 +136,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -137,6 +155,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -153,6 +174,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -177,6 +201,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -193,6 +220,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -209,6 +239,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -219,6 +252,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -241,6 +277,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -257,6 +296,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -273,6 +315,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -294,6 +339,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -310,6 +358,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -321,6 +372,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -343,6 +397,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -353,6 +410,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -364,6 +424,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -376,6 +439,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -386,6 +452,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -485,6 +554,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -572,6 +644,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -606,6 +681,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
diff --git a/vendor/modernc.org/libc/libc_openbsd_amd64.go b/vendor/modernc.org/libc/libc_openbsd_amd64.go
index 434f06bb2..d600c5a9a 100644
--- a/vendor/modernc.org/libc/libc_openbsd_amd64.go
+++ b/vendor/modernc.org/libc/libc_openbsd_amd64.go
@@ -7,11 +7,13 @@ package libc // import "modernc.org/libc"
import (
"strings"
"syscall"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
"modernc.org/libc/fcntl"
"modernc.org/libc/fts"
+ "modernc.org/libc/stdio"
"modernc.org/libc/sys/types"
"modernc.org/libc/time"
"modernc.org/libc/utime"
@@ -22,8 +24,15 @@ type (
ulong = uint64
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
// t.setErrno(err)
@@ -35,6 +44,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -74,6 +86,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -90,6 +105,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -106,6 +124,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -122,6 +143,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -138,6 +162,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -154,6 +181,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -178,6 +208,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -194,6 +227,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -210,6 +246,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -220,6 +259,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -242,6 +284,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -258,6 +303,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -274,6 +322,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -295,6 +346,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -311,6 +365,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -322,6 +379,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -344,6 +404,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -354,6 +417,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -365,6 +431,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -377,6 +446,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -388,6 +460,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// 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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -487,6 +562,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -574,6 +652,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -608,6 +689,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -631,3 +715,18 @@ func Xopendir(t *TLS, name uintptr) uintptr {
(*darwinDir)(unsafe.Pointer(p)).eof = false
return p
}
+
+func Xrewinddir(tls *TLS, f uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ Xfseek(tls, f, 0, stdio.SEEK_SET)
+}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_openbsd_arm64.go b/vendor/modernc.org/libc/libc_openbsd_arm64.go
index 8843f989b..89af87295 100644
--- a/vendor/modernc.org/libc/libc_openbsd_arm64.go
+++ b/vendor/modernc.org/libc/libc_openbsd_arm64.go
@@ -7,6 +7,7 @@ package libc // import "modernc.org/libc"
import (
"strings"
"syscall"
+ gotime "time"
"unsafe"
"golang.org/x/sys/unix"
@@ -22,8 +23,15 @@ type (
ulong = uint64
)
+var (
+ startTime = gotime.Now() // For clock(3)
+)
+
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
// t.setErrno(err)
@@ -35,6 +43,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
switch m {
@@ -74,6 +85,9 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -90,6 +104,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
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)
@@ -106,6 +123,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
@@ -122,6 +142,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int access(const char *pathname, int mode);
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -138,6 +161,9 @@ func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
if err := unix.Unlink(GoString(pathname)); err != nil {
if dmesgs {
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
@@ -154,6 +180,9 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
var n int
var err error
switch {
@@ -178,6 +207,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -194,6 +226,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int chmod(const char *pathname, mode_t mode)
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
if dmesgs {
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
@@ -210,6 +245,9 @@ func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) time.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n := time.Now().UTC().Unix()
// if tloc != 0 {
@@ -220,6 +258,9 @@ func Xtime(t *TLS, tloc uintptr) time.Time_t {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -242,6 +283,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
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)
@@ -258,6 +302,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
n, err := unix.Seek(int(fd), int64(offset), int(whence))
if err != nil {
if dmesgs {
@@ -274,6 +321,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
}
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
var arg uintptr
if args != 0 {
arg = *(*uintptr)(unsafe.Pointer(args))
@@ -295,6 +345,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
if dmesgs {
dmesg("%v: %v FAIL", origin(1), err)
@@ -311,6 +364,9 @@ func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -322,6 +378,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
var a []unix.Timeval
if times != 0 {
a = make([]unix.Timeval, 2)
@@ -344,6 +403,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// 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 __ccgo_strace {
+ trc("t=%v pathname=%v owner=%v group=%v, (%v:)", t, pathname, owner, group, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
t.setErrno(err)
return -1
@@ -354,6 +416,9 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -365,6 +430,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -377,6 +445,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -388,6 +459,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// 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: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(347)
//TODO defer tls.Free(347)
@@ -487,6 +561,9 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen siz
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
panic(todo(""))
//TODO bp := tls.Alloc(28)
//TODO defer tls.Free(28)
@@ -574,6 +651,9 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
t.setErrno(err)
return -1
@@ -608,6 +688,9 @@ func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Err
// DIR *opendir(const char *name);
func Xopendir(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
if p == 0 {
panic("OOM")
@@ -631,3 +714,11 @@ func Xopendir(t *TLS, name uintptr) uintptr {
(*darwinDir)(unsafe.Pointer(p)).eof = false
return p
}
+
+// clock_t clock(void);
+func Xclock(t *TLS) time.Clock_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
+ return time.Clock_t(gotime.Since(startTime) * gotime.Duration(time.CLOCKS_PER_SEC) / gotime.Second)
+}
diff --git a/vendor/modernc.org/libc/libc_ppc64le.go b/vendor/modernc.org/libc/libc_ppc64le.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_ppc64le.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_riscv64.go b/vendor/modernc.org/libc/libc_riscv64.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_riscv64.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_s390x.go b/vendor/modernc.org/libc/libc_s390x.go
new file mode 100644
index 000000000..de3e34974
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_s390x.go
@@ -0,0 +1,38 @@
+// Copyright 2023 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 (
+ "fmt"
+ "unsafe"
+)
+
+// Byte loads are atomic on this CPU.
+func a_load_8(addr uintptr) uint32 {
+ return uint32(*(*byte)(unsafe.Pointer(addr)))
+}
+
+// int16 loads are atomic on this CPU when properly aligned.
+func a_load_16(addr uintptr) uint32 {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ return uint32(*(*uint16)(unsafe.Pointer(addr)))
+}
+
+// Byte sores are atomic on this CPU.
+func a_store_8(addr uintptr, b byte) {
+ *(*byte)(unsafe.Pointer(addr)) = b
+}
+
+// int16 stores are atomic on this CPU when properly aligned.
+func a_store_16(addr uintptr, n uint16) {
+ if addr&1 != 0 {
+ panic(fmt.Errorf("unaligned atomic 16 bit access at %#0x", addr))
+ }
+
+ *(*uint16)(unsafe.Pointer(addr)) = n
+}
diff --git a/vendor/modernc.org/libc/libc_unix.go b/vendor/modernc.org/libc/libc_unix.go
index 085c86b35..79a0fdd97 100644
--- a/vendor/modernc.org/libc/libc_unix.go
+++ b/vendor/modernc.org/libc/libc_unix.go
@@ -9,13 +9,14 @@ package libc // import "modernc.org/libc"
import (
"bufio"
- "encoding/hex"
+ // "encoding/hex"
"io/ioutil"
"math"
"math/rand"
"os"
gosignal "os/signal"
"reflect"
+ "runtime"
"strconv"
"strings"
"sync"
@@ -24,9 +25,11 @@ import (
"unsafe"
guuid "github.com/google/uuid"
+ "github.com/ncruces/go-strftime"
"golang.org/x/sys/unix"
"modernc.org/libc/errno"
"modernc.org/libc/grp"
+ "modernc.org/libc/limits"
"modernc.org/libc/poll"
"modernc.org/libc/pwd"
"modernc.org/libc/signal"
@@ -44,6 +47,9 @@ func init() {
// sighandler_t signal(int signum, sighandler_t handler);
func Xsignal(t *TLS, signum int32, handler uintptr) uintptr { //TODO use sigaction?
+ if __ccgo_strace {
+ trc("t=%v signum=%v handler=%v, (%v:)", t, signum, handler, origin(2))
+ }
signalsMu.Lock()
defer signalsMu.Unlock()
@@ -88,11 +94,17 @@ func Xsignal(t *TLS, signum int32, handler uintptr) uintptr { //TODO use sigacti
// void rewind(FILE *stream);
func Xrewind(t *TLS, stream uintptr) {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
Xfseek(t, stream, 0, stdio.SEEK_SET)
}
// int putchar(int c);
func Xputchar(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
if _, err := write([]byte{byte(c)}); err != nil {
return stdio.EOF
}
@@ -102,6 +114,9 @@ func Xputchar(t *TLS, c int32) int32 {
// int gethostname(char *name, size_t len);
func Xgethostname(t *TLS, name uintptr, slen types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%v slen=%v, (%v:)", t, name, slen, origin(2))
+ }
if slen < 0 {
t.setErrno(errno.EINVAL)
return -1
@@ -128,41 +143,65 @@ func Xgethostname(t *TLS, name uintptr, slen types.Size_t) int32 {
// int remove(const char *pathname);
func Xremove(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
panic(todo(""))
}
// long pathconf(const char *path, int name);
func Xpathconf(t *TLS, path uintptr, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v path=%v name=%v, (%v:)", t, path, name, origin(2))
+ }
panic(todo(""))
}
// ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen);
func Xrecvfrom(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32, src_addr, addrlen uintptr) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v addrlen=%v, (%v:)", t, sockfd, buf, len, flags, addrlen, origin(2))
+ }
panic(todo(""))
}
// ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen);
func Xsendto(t *TLS, sockfd int32, buf uintptr, len types.Size_t, flags int32, src_addr uintptr, addrlen socklen_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v len=%v flags=%v src_addr=%v addrlen=%v, (%v:)", t, sockfd, buf, len, flags, src_addr, addrlen, origin(2))
+ }
panic(todo(""))
}
// void srand48(long int seedval);
func Xsrand48(t *TLS, seedval long) {
+ if __ccgo_strace {
+ trc("t=%v seedval=%v, (%v:)", t, seedval, origin(2))
+ }
panic(todo(""))
}
// long int lrand48(void);
func Xlrand48(t *TLS) long {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
func Xsendmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2))
+ }
panic(todo(""))
}
// int poll(struct pollfd *fds, nfds_t nfds, int timeout);
func Xpoll(t *TLS, fds uintptr, nfds poll.Nfds_t, timeout int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fds=%v nfds=%v timeout=%v, (%v:)", t, fds, nfds, timeout, origin(2))
+ }
if nfds == 0 {
panic(todo(""))
}
@@ -182,64 +221,83 @@ func Xpoll(t *TLS, fds uintptr, nfds poll.Nfds_t, timeout int32) int32 {
return int32(n)
}
-// ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
-func Xrecvmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t {
- n, _, err := unix.Syscall(unix.SYS_RECVMSG, uintptr(sockfd), msg, uintptr(flags))
- if err != 0 {
- t.setErrno(err)
- return -1
- }
-
- return types.Ssize_t(n)
-}
-
// struct cmsghdr *CMSG_NXTHDR(struct msghdr *msgh, struct cmsghdr *cmsg);
func X__cmsg_nxthdr(t *TLS, msgh, cmsg uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v cmsg=%v, (%v:)", t, cmsg, origin(2))
+ }
panic(todo(""))
}
// wchar_t *wcschr(const wchar_t *wcs, wchar_t wc);
func Xwcschr(t *TLS, wcs uintptr, wc wchar_t) wchar_t {
+ if __ccgo_strace {
+ trc("t=%v wcs=%v wc=%v, (%v:)", t, wcs, wc, origin(2))
+ }
panic(todo(""))
}
// gid_t getegid(void);
func Xgetegid(t *TLS) types.Gid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// gid_t getgid(void);
func Xgetgid(t *TLS) types.Gid_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// void *shmat(int shmid, const void *shmaddr, int shmflg);
func Xshmat(t *TLS, shmid int32, shmaddr uintptr, shmflg int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v shmid=%v shmaddr=%v shmflg=%v, (%v:)", t, shmid, shmaddr, shmflg, origin(2))
+ }
panic(todo(""))
}
// int shmctl(int shmid, int cmd, struct shmid_ds *buf);
func Xshmctl(t *TLS, shmid, cmd int32, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v buf=%v, (%v:)", t, cmd, buf, origin(2))
+ }
panic(todo(""))
}
// int shmdt(const void *shmaddr);
func Xshmdt(t *TLS, shmaddr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v shmaddr=%v, (%v:)", t, shmaddr, origin(2))
+ }
panic(todo(""))
}
// int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
func Xgetresuid(t *TLS, ruid, euid, suid uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v suid=%v, (%v:)", t, suid, origin(2))
+ }
panic(todo(""))
}
// int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
func Xgetresgid(t *TLS, rgid, egid, sgid uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sgid=%v, (%v:)", t, sgid, origin(2))
+ }
panic(todo(""))
}
// FILE *tmpfile(void);
func Xtmpfile(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
f, err := ioutil.TempFile("", "tmpfile-")
if err != nil {
t.setErrno(err)
@@ -258,6 +316,9 @@ func Xtmpfile(t *TLS) uintptr {
// FILE *fdopen(int fd, const char *mode);
func Xfdopen(t *TLS, fd int32, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
switch m {
case
@@ -282,6 +343,9 @@ func Xfdopen(t *TLS, fd int32, mode uintptr) uintptr {
// struct passwd *getpwnam(const char *name);
func Xgetpwnam(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
f, err := os.Open("/etc/passwd")
if err != nil {
panic(todo("", err))
@@ -334,6 +398,9 @@ func Xgetpwnam(t *TLS, name uintptr) uintptr {
// int getpwnam_r(char *name, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);
func Xgetpwnam_r(t *TLS, name, cpwd, buf uintptr, buflen types.Size_t, result uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v buflen=%v result=%v, (%v:)", t, buf, buflen, result, origin(2))
+ }
f, err := os.Open("/etc/passwd")
if err != nil {
panic(todo("", err))
@@ -399,6 +466,9 @@ var staticGetgrgid grp.Group
// struct group *getgrgid(gid_t gid);
func Xgetgrgid(t *TLS, gid uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v gid=%v, (%v:)", t, gid, origin(2))
+ }
f, err := os.Open("/etc/group")
if err != nil {
panic(todo(""))
@@ -440,6 +510,9 @@ func Xgetgrgid(t *TLS, gid uint32) uintptr {
// int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen, struct group **result);
func Xgetgrgid_r(t *TLS, gid uint32, pGrp, buf uintptr, buflen types.Size_t, result uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v gid=%v buf=%v buflen=%v result=%v, (%v:)", t, gid, buf, buflen, result, origin(2))
+ }
f, err := os.Open("/etc/group")
if err != nil {
panic(todo(""))
@@ -626,6 +699,9 @@ func init() {
// struct passwd *getpwuid(uid_t uid);
func Xgetpwuid(t *TLS, uid uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v uid=%v, (%v:)", t, uid, origin(2))
+ }
f, err := os.Open("/etc/passwd")
if err != nil {
panic(todo("", err))
@@ -688,6 +764,9 @@ func initPasswd(t *TLS, p *pwd.Passwd, name, pwd string, uid, gid uint32, gecos,
// struct group *getgrnam(const char *name);
func Xgetgrnam(t *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
f, err := os.Open("/etc/group")
if err != nil {
panic(todo(""))
@@ -734,6 +813,9 @@ func Xgetgrnam(t *TLS, name uintptr) uintptr {
// int getgrnam_r(const char *name, struct group *grp, char *buf, size_t buflen, struct group **result);
func Xgetgrnam_r(t *TLS, name, pGrp, buf uintptr, buflen types.Size_t, result uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v buflen=%v result=%v, (%v:)", t, buf, buflen, result, origin(2))
+ }
f, err := os.Open("/etc/group")
if err != nil {
panic(todo(""))
@@ -787,6 +869,9 @@ func Xgetgrnam_r(t *TLS, name, pGrp, buf uintptr, buflen types.Size_t, result ui
// int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);
func Xgetpwuid_r(t *TLS, uid types.Uid_t, cpwd, buf uintptr, buflen types.Size_t, result uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v uid=%v buf=%v buflen=%v result=%v, (%v:)", t, uid, buf, buflen, result, origin(2))
+ }
f, err := os.Open("/etc/passwd")
if err != nil {
panic(todo("", err))
@@ -846,6 +931,9 @@ func Xgetpwuid_r(t *TLS, uid types.Uid_t, cpwd, buf uintptr, buflen types.Size_t
// int mkostemp(char *template, int flags);
func Xmkostemp(t *TLS, template uintptr, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v flags=%v, (%v:)", t, template, flags, origin(2))
+ }
len := uintptr(Xstrlen(t, template))
x := template + uintptr(len-6)
for i := uintptr(0); i < 6; i++ {
@@ -866,12 +954,18 @@ func Xmkostemp(t *TLS, template uintptr, flags int32) int32 {
// void uuid_generate_random(uuid_t out);
func Xuuid_generate_random(t *TLS, out uintptr) {
+ if __ccgo_strace {
+ trc("t=%v out=%v, (%v:)", t, out, origin(2))
+ }
x := guuid.New()
copy((*RawMem)(unsafe.Pointer(out))[:], x[:])
}
// void uuid_unparse(uuid_t uu, char *out);
func Xuuid_unparse(t *TLS, uu, out uintptr) {
+ if __ccgo_strace {
+ trc("t=%v out=%v, (%v:)", t, out, origin(2))
+ }
s := (*guuid.UUID)(unsafe.Pointer(uu)).String()
copy((*RawMem)(unsafe.Pointer(out))[:], s)
*(*byte)(unsafe.Pointer(out + uintptr(len(s)))) = 0
@@ -881,12 +975,18 @@ var staticRandomData = &rand.Rand{}
// char *initstate(unsigned seed, char *state, size_t size);
func Xinitstate(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v seed=%v statebuf=%v statelen=%v, (%v:)", t, seed, statebuf, statelen, origin(2))
+ }
staticRandomData = rand.New(rand.NewSource(int64(seed)))
return 0
}
// char *setstate(const char *state);
func Xsetstate(t *TLS, state uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v state=%v, (%v:)", t, state, origin(2))
+ }
t.setErrno(errno.EINVAL) //TODO
return 0
}
@@ -902,6 +1002,9 @@ func Xsetstate(t *TLS, state uintptr) uintptr {
//
// char *initstate_r(unsigned int seed, char *statebuf, size_t statelen, struct random_data *buf);
func Xinitstate_r(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v seed=%v statebuf=%v statelen=%v buf=%v, (%v:)", t, seed, statebuf, statelen, buf, origin(2))
+ }
if buf == 0 {
panic(todo(""))
}
@@ -921,11 +1024,17 @@ var (
// int mkstemps(char *template, int suffixlen);
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2))
+ }
return Xmkstemps64(t, template, suffixlen)
}
// int mkstemps(char *template, int suffixlen);
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2))
+ }
len := uintptr(Xstrlen(t, template))
x := template + uintptr(len-6) - uintptr(suffixlen)
for i := uintptr(0); i < 6; i++ {
@@ -946,16 +1055,25 @@ func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
// int mkstemp(char *template);
func Xmkstemp(t *TLS, template uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v, (%v:)", t, template, origin(2))
+ }
return Xmkstemp64(t, template)
}
// int mkstemp(char *template);
func Xmkstemp64(t *TLS, template uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v, (%v:)", t, template, origin(2))
+ }
return Xmkstemps64(t, template, 0)
}
// int random_r(struct random_data *buf, int32_t *result);
func Xrandom_r(t *TLS, buf, result uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v result=%v, (%v:)", t, result, origin(2))
+ }
randomDataMu.Lock()
defer randomDataMu.Unlock()
@@ -970,11 +1088,17 @@ func Xrandom_r(t *TLS, buf, result uintptr) int32 {
// int strerror_r(int errnum, char *buf, size_t buflen);
func Xstrerror_r(t *TLS, errnum int32, buf uintptr, buflen size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v buf=%v buflen=%v, (%v:)", t, errnum, buf, buflen, origin(2))
+ }
panic(todo(""))
}
// void endpwent(void);
func Xendpwent(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
// nop
}
@@ -982,11 +1106,17 @@ var ctimeStaticBuf [32]byte
// char *ctime(const time_t *timep);
func Xctime(t *TLS, timep uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v timep=%v, (%v:)", t, timep, origin(2))
+ }
return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
}
// char *ctime_r(const time_t *timep, char *buf);
func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
ut := *(*ctime.Time_t)(unsafe.Pointer(timep))
tm := time.Unix(int64(ut), 0).Local()
s := tm.Format(time.ANSIC) + "\n\x00"
@@ -996,6 +1126,9 @@ func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
// ssize_t pread(int fd, void *buf, size_t count, off_t offset);
func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v offset=%v, (%v:)", t, fd, buf, count, offset, origin(2))
+ }
var n int
var err error
switch {
@@ -1003,20 +1136,258 @@ func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_
n, err = unix.Pread(int(fd), nil, int64(offset))
default:
n, err = unix.Pread(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset))
- if dmesgs && err == nil {
- dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n]))
- }
+ // if dmesgs && err == nil {
+ // dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n]))
+ // }
}
if err != nil {
- if dmesgs {
- dmesg("%v: %v FAIL", origin(1), err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v FAIL", origin(1), err)
+ // }
t.setErrno(err)
return -1
}
- if dmesgs {
- dmesg("%v: ok", origin(1))
- }
+ // if dmesgs {
+ // dmesg("%v: ok", origin(1))
+ // }
return types.Ssize_t(n)
}
+
+// // malloc_zone_t * malloc_create_zone(vm_size_t start_size, unsigned flags);
+// func Xmalloc_create_zone(t *TLS, start_size types.Size_t, flags uint32) uintptr {
+// if __ccgo_strace {
+// trc("t=%v start_size=%v flags=%v, (%v:)", t, start_size, flags, origin(2))
+// }
+// panic(todo(""))
+// }
+//
+// // void * malloc_zone_malloc(malloc_zone_t *zone, size_t size);
+// func Xmalloc_zone_malloc(t *TLS, zone uintptr, size types.Size_t) uintptr {
+// if __ccgo_strace {
+// trc("t=%v zone=%v size=%v, (%v:)", t, zone, size, origin(2))
+// }
+// if zone == defaultZone {
+// return Xmalloc(t, size)
+// }
+//
+// panic(todo(""))
+// }
+//
+// // malloc_zone_t * malloc_default_zone(void);
+// func Xmalloc_default_zone(t *TLS) uintptr {
+// if __ccgo_strace {
+// trc("t=%v (%v:)", t, origin(2))
+// }
+// return defaultZone
+// }
+//
+// // void malloc_zone_free(malloc_zone_t *zone, void *ptr);
+// func Xmalloc_zone_free(t *TLS, zone, ptr uintptr) {
+// if __ccgo_strace {
+// trc("t=%v zone=%v ptr=%v, (%v:)", t, zone, ptr, origin(2))
+// }
+//
+// if zone == defaultZone {
+// Xfree(t, ptr)
+// return
+// }
+//
+// panic(todo(""))
+// }
+//
+// // void * malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size);
+// func Xmalloc_zone_realloc(t *TLS, zone, ptr uintptr, size types.Size_t) uintptr {
+// if __ccgo_strace {
+// trc("t=%v zone=%v ptr=%v size=%v, (%v:)", t, zone, ptr, size, origin(2))
+// }
+// panic(todo(""))
+// }
+
+// int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+func Xsysctlbyname(t *TLS, name, oldp, oldlenp, newp uintptr, newlen types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v name=%q oldp=%#0x oldlenp=%v newp=%v newlen=%v, (%v:)", t, GoString(name), oldp, *(*types.Size_t)(unsafe.Pointer(oldlenp)), newp, newlen, origin(2))
+ }
+ oldlen := *(*types.Size_t)(unsafe.Pointer(oldlenp))
+ switch GoString(name) {
+ case "hw.ncpu":
+ if oldlen != 4 {
+ panic(todo(""))
+ }
+
+ *(*int32)(unsafe.Pointer(oldp)) = int32(runtime.GOMAXPROCS(-1))
+ return 0
+ default:
+ t.setErrno(errno.ENOENT)
+ return -1
+ }
+}
+
+// type mallocZone struct {
+// a memory.Allocator
+// mu sync.Mutex
+//
+// isDefault bool
+// }
+//
+// func newMallocZone(isDefault bool) *mallocZone {
+// return &mallocZone{isDefault: isDefault}
+// }
+//
+// var (
+// defaultZone uintptr
+// )
+//
+// func init() {
+// defaultZone = addObject(newMallocZone(true))
+// }
+
+// /tmp/libc/musl-master/src/time/gmtime.c:6:19:
+var _tm ctime.Tm
+
+// /tmp/libc/musl-master/src/time/gmtime.c:4:11:
+func Xgmtime(tls *TLS, t uintptr) (r uintptr) { // /tmp/libc/musl-master/src/time/gmtime.c:7:2:
+ if __ccgo_strace {
+ trc("tls=%v t=%v, (%v:)", tls, t, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ return Xgmtime_r(tls, t, uintptr(unsafe.Pointer(&_tm)))
+}
+
+var _days_in_month = [12]int8{
+ 0: int8(31),
+ 1: int8(30),
+ 2: int8(31),
+ 3: int8(30),
+ 4: int8(31),
+ 5: int8(31),
+ 6: int8(30),
+ 7: int8(31),
+ 8: int8(30),
+ 9: int8(31),
+ 10: int8(31),
+ 11: int8(29),
+}
+
+var x___utc = [4]int8{'U', 'T', 'C'}
+
+func Xstrftime(tls *TLS, s uintptr, n size_t, f uintptr, tm uintptr) (r size_t) {
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v f=%v tm=%v, (%v:)", tls, s, n, f, tm, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ tt := time.Date(
+ int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_year+1900),
+ time.Month((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mon+1),
+ int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mday),
+ int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_hour),
+ int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_min),
+ int((*ctime.Tm)(unsafe.Pointer(tm)).Ftm_sec),
+ 0,
+ time.UTC,
+ )
+ fmt := GoString(f)
+ var result string
+ if fmt != "" {
+ result = strftime.Format(fmt, tt)
+ }
+ switch r = size_t(len(result)); {
+ case r > n:
+ r = 0
+ default:
+ copy((*RawMem)(unsafe.Pointer(s))[:r:r], result)
+ *(*byte)(unsafe.Pointer(s + uintptr(r))) = 0
+ }
+ return r
+
+}
+
+func Xgmtime_r(tls *TLS, t uintptr, tm uintptr) (r uintptr) {
+ if __ccgo_strace {
+ trc("tls=%v t=%v tm=%v, (%v:)", tls, t, tm, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ if x___secs_to_tm(tls, int64(*(*time_t)(unsafe.Pointer(t))), tm) < 0 {
+ *(*int32)(unsafe.Pointer(X__errno_location(tls))) = int32(errno.EOVERFLOW)
+ return uintptr(0)
+ }
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_isdst = 0
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_gmtoff = 0
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_zone = uintptr(unsafe.Pointer(&x___utc))
+ return tm
+}
+
+func x___secs_to_tm(tls *TLS, t int64, tm uintptr) (r int32) {
+ var c_cycles, leap, months, q_cycles, qc_cycles, remdays, remsecs, remyears, wday, yday int32
+ var days, secs, years int64
+ _, _, _, _, _, _, _, _, _, _, _, _, _ = c_cycles, days, leap, months, q_cycles, qc_cycles, remdays, remsecs, remyears, secs, wday, yday, years
+ /* Reject time_t values whose year would overflow int */
+ if t < int64(-Int32FromInt32(1)-Int32FromInt32(0x7fffffff))*Int64FromInt64(31622400) || t > Int64FromInt32(limits.INT_MAX)*Int64FromInt64(31622400) {
+ return -int32(1)
+ }
+ secs = t - (Int64FromInt64(946684800) + int64(Int32FromInt32(86400)*(Int32FromInt32(31)+Int32FromInt32(29))))
+ days = secs / int64(86400)
+ remsecs = int32(secs % int64(86400))
+ if remsecs < 0 {
+ remsecs += int32(86400)
+ days--
+ }
+ wday = int32((int64(3) + days) % int64(7))
+ if wday < 0 {
+ wday += int32(7)
+ }
+ qc_cycles = int32(days / int64(Int32FromInt32(365)*Int32FromInt32(400)+Int32FromInt32(97)))
+ remdays = int32(days % int64(Int32FromInt32(365)*Int32FromInt32(400)+Int32FromInt32(97)))
+ if remdays < 0 {
+ remdays += Int32FromInt32(365)*Int32FromInt32(400) + Int32FromInt32(97)
+ qc_cycles--
+ }
+ c_cycles = remdays / (Int32FromInt32(365)*Int32FromInt32(100) + Int32FromInt32(24))
+ if c_cycles == int32(4) {
+ c_cycles--
+ }
+ remdays -= c_cycles * (Int32FromInt32(365)*Int32FromInt32(100) + Int32FromInt32(24))
+ q_cycles = remdays / (Int32FromInt32(365)*Int32FromInt32(4) + Int32FromInt32(1))
+ if q_cycles == int32(25) {
+ q_cycles--
+ }
+ remdays -= q_cycles * (Int32FromInt32(365)*Int32FromInt32(4) + Int32FromInt32(1))
+ remyears = remdays / int32(365)
+ if remyears == int32(4) {
+ remyears--
+ }
+ remdays -= remyears * int32(365)
+ leap = BoolInt32(!(remyears != 0) && (q_cycles != 0 || !(c_cycles != 0)))
+ yday = remdays + int32(31) + int32(28) + leap
+ if yday >= int32(365)+leap {
+ yday -= int32(365) + leap
+ }
+ years = int64(remyears+int32(4)*q_cycles+int32(100)*c_cycles) + int64(400)*int64(int64(qc_cycles))
+ months = 0
+ for {
+ if !(int32(_days_in_month[months]) <= remdays) {
+ break
+ }
+ remdays -= int32(_days_in_month[months])
+ goto _1
+ _1:
+ months++
+ }
+ if months >= int32(10) {
+ months -= int32(12)
+ years++
+ }
+ if years+int64(100) > int64(limits.INT_MAX) || years+int64(100) < int64(-Int32FromInt32(1)-Int32FromInt32(0x7fffffff)) {
+ return -int32(1)
+ }
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_year = int32(years + int64(100))
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mon = months + int32(2)
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_mday = remdays + int32(1)
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_wday = wday
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_yday = yday
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_hour = remsecs / int32(3600)
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_min = remsecs / int32(60) % int32(60)
+ (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_sec = remsecs % int32(60)
+ return 0
+}
diff --git a/vendor/modernc.org/libc/libc_unix1.go b/vendor/modernc.org/libc/libc_unix1.go
new file mode 100644
index 000000000..f6acf93ac
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_unix1.go
@@ -0,0 +1,27 @@
+// Copyright 2024 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.
+
+//go:build unix && !illumos
+
+package libc // import "modernc.org/libc"
+
+import (
+ "golang.org/x/sys/unix"
+
+ "modernc.org/libc/sys/types"
+)
+
+// ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
+func Xrecvmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2))
+ }
+ n, _, err := unix.Syscall(unix.SYS_RECVMSG, uintptr(sockfd), msg, uintptr(flags))
+ if err != 0 {
+ t.setErrno(err)
+ return -1
+ }
+
+ return types.Ssize_t(n)
+}
diff --git a/vendor/modernc.org/libc/libc_unix2.go b/vendor/modernc.org/libc/libc_unix2.go
new file mode 100644
index 000000000..4150bf58a
--- /dev/null
+++ b/vendor/modernc.org/libc/libc_unix2.go
@@ -0,0 +1,26 @@
+// Copyright 2024 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.
+
+//go:build illumos
+
+package libc // import "modernc.org/libc"
+
+import (
+ "modernc.org/libc/sys/types"
+)
+
+// ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
+func Xrecvmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2))
+ }
+ panic(todo(""))
+ // n, _, err := unix.Syscall(unix.SYS_RECVMSG, uintptr(sockfd), msg, uintptr(flags))
+ // if err != 0 {
+ // t.setErrno(err)
+ // return -1
+ // }
+ //
+ // return types.Ssize_t(n)
+}
diff --git a/vendor/modernc.org/libc/libc_windows.go b/vendor/modernc.org/libc/libc_windows.go
index fc36dc5a5..309d49935 100644
--- a/vendor/modernc.org/libc/libc_windows.go
+++ b/vendor/modernc.org/libc/libc_windows.go
@@ -21,6 +21,7 @@ import (
"unicode/utf16"
"unsafe"
+ "github.com/ncruces/go-strftime"
"modernc.org/libc/errno"
"modernc.org/libc/fcntl"
"modernc.org/libc/limits"
@@ -36,6 +37,7 @@ var X__imp__environ = EnvironP()
var X__imp__wenviron = uintptr(unsafe.Pointer(&wenviron))
var X_imp___environ = EnvironP()
var X_iob [stdio.X_IOB_ENTRIES]stdio.FILE
+var Xin6addr_any [16]byte
var Xtimezone long // extern long timezone;
@@ -52,6 +54,13 @@ func init() {
}
}
+func X__p__wenviron(t *TLS) uintptr {
+ if !wenvValid {
+ bootWinEnviron(t)
+ }
+ return uintptr(unsafe.Pointer(&wenviron))
+}
+
func winGetObject(stream uintptr) interface{} {
if fd, ok := iobMap[stream]; ok {
f, _ := fdToFile(fd)
@@ -153,6 +162,7 @@ var (
procSleepEx = modkernel32.NewProc("SleepEx")
procSystemTimeToFileTime = modkernel32.NewProc("SystemTimeToFileTime")
procTerminateThread = modkernel32.NewProc("TerminateThread")
+ procTryEnterCriticalSection = modkernel32.NewProc("TryEnterCriticalSection")
procUnlockFile = modkernel32.NewProc("UnlockFile")
procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
procWaitForSingleObjectEx = modkernel32.NewProc("WaitForSingleObjectEx")
@@ -203,6 +213,14 @@ var (
userenvapi = syscall.NewLazyDLL("userenv.dll")
procGetProfilesDirectoryW = userenvapi.NewProc("GetProfilesDirectoryW")
+
+ modcrt = syscall.NewLazyDLL("msvcrt.dll")
+ procAccess = modcrt.NewProc("_access")
+ procGmtime = modcrt.NewProc("gmtime")
+ procGmtime64 = modcrt.NewProc("_gmtime64")
+ procStat64i32 = modcrt.NewProc("_stat64i32")
+ procStrftime = modcrt.NewProc("strftime")
+ procStrtod = modcrt.NewProc("strtod")
)
var (
@@ -344,6 +362,9 @@ func fwrite(fd int32, b []byte) (int, error) {
// int fprintf(FILE *stream, const char *format, ...);
func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -356,12 +377,18 @@ func Xfprintf(t *TLS, stream, format, args uintptr) int32 {
// int usleep(useconds_t usec);
func Xusleep(t *TLS, usec types.Useconds_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v usec=%v, (%v:)", t, usec, origin(2))
+ }
gotime.Sleep(gotime.Microsecond * gotime.Duration(usec))
return 0
}
// int getrusage(int who, struct rusage *usage);
func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v who=%v usage=%v, (%v:)", t, who, usage, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRUSAGE, uintptr(who), usage, 0); err != 0 {
// t.setErrno(err)
@@ -373,16 +400,25 @@ func Xgetrusage(t *TLS, who int32, usage uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xlstat64(t, pathname, statbuf)
}
// int stat(const char *pathname, struct stat *statbuf);
func Xstat(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
return Xstat64(t, pathname, statbuf)
}
// int chdir(const char *path);
func Xchdir(t *TLS, path uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v, (%v:)", t, path, origin(2))
+ }
err := syscall.Chdir(GoString(path))
if err != nil {
t.setErrno(err)
@@ -445,6 +481,9 @@ func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr {
//
// );
func X_wopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
var mode types.Mode_t
if args != 0 {
mode = *(*types.Mode_t)(unsafe.Pointer(args))
@@ -469,11 +508,17 @@ func X_wopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
// int open(const char *pathname, int flags, ...);
func Xopen(t *TLS, pathname uintptr, flags int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v args=%v, (%v:)", t, pathname, flags, args, origin(2))
+ }
return Xopen64(t, pathname, flags, args)
}
// int open(const char *pathname, int flags, ...);
func Xopen64(t *TLS, pathname uintptr, flags int32, cmode uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v flags=%v cmode=%v, (%v:)", t, pathname, flags, cmode, origin(2))
+ }
var mode types.Mode_t
if cmode != 0 {
@@ -500,6 +545,9 @@ func Xopen64(t *TLS, pathname uintptr, flags int32, cmode uintptr) int32 {
// off_t lseek(int fd, off_t offset, int whence);
func Xlseek(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
return types.Off_t(Xlseek64(t, fd, offset, whence))
}
@@ -520,6 +568,9 @@ var fsyncStatbuf stat.Stat
// int fsync(int fd);
func Xfsync(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -540,6 +591,9 @@ func Xfsync(t *TLS, fd int32) int32 {
// long sysconf(int name);
func Xsysconf(t *TLS, name int32) long {
+ if __ccgo_strace {
+ trc("t=%v name=%v, (%v:)", t, name, origin(2))
+ }
panic(todo(""))
// switch name {
// case unistd.X_SC_PAGESIZE:
@@ -551,6 +605,9 @@ func Xsysconf(t *TLS, name int32) long {
// int close(int fd);
func Xclose(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -572,6 +629,9 @@ func Xclose(t *TLS, fd int32) int32 {
// char *getcwd(char *buf, size_t size);
func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
b := make([]uint16, size)
n, err := syscall.GetCurrentDirectory(uint32(len(b)), &b[0])
@@ -597,16 +657,25 @@ func Xgetcwd(t *TLS, buf uintptr, size types.Size_t) uintptr {
// int fstat(int fd, struct stat *statbuf);
func Xfstat(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
return Xfstat64(t, fd, statbuf)
}
// int ftruncate(int fd, off_t length);
func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
return Xftruncate64(t, fd, length)
}
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
return Xfcntl64(t, fd, cmd, args)
}
@@ -618,6 +687,9 @@ func Xfcntl(t *TLS, fd, cmd int32, args uintptr) int32 {
//
// );
func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
t.setErrno(errno.EBADF)
@@ -638,6 +710,13 @@ func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 {
return int32(n)
}
+func X_read(t *TLS, fd int32, buf uintptr, count uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
+ return Xread(t, fd, buf, count)
+}
+
// int _write( // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/write?view=msvc-160
//
// int fd,
@@ -646,6 +725,9 @@ func Xread(t *TLS, fd int32, buf uintptr, count uint32) int32 {
//
// );
func Xwrite(t *TLS, fd int32, buf uintptr, count uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
t.setErrno(errno.EBADF)
@@ -669,8 +751,18 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count uint32) int32 {
return int32(n)
}
+func X_write(t *TLS, fd int32, buf uintptr, count uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buf=%v count=%v, (%v:)", t, fd, buf, count, origin(2))
+ }
+ return Xwrite(t, fd, buf, count)
+}
+
// int fchmod(int fd, mode_t mode);
func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -701,6 +793,9 @@ func Xfchmod(t *TLS, fd int32, mode types.Mode_t) int32 {
// int munmap(void *addr, size_t length);
func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v, (%v:)", t, addr, length, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MUNMAP, addr, uintptr(length), 0); err != 0 {
// t.setErrno(err)
@@ -712,6 +807,9 @@ func Xmunmap(t *TLS, addr uintptr, length types.Size_t) int32 {
// int gettimeofday(struct timeval *tv, struct timezone *tz);
func Xgettimeofday(t *TLS, tv, tz uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v tz=%v, (%v:)", t, tz, origin(2))
+ }
panic(todo(""))
// if tz != 0 {
// panic(todo(""))
@@ -746,6 +844,9 @@ func Xsetsockopt(t *TLS, _ ...interface{}) int32 {
// int ioctl(int fd, unsigned long request, ...);
func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v request=%v va=%v, (%v:)", t, fd, request, va, origin(2))
+ }
panic(todo(""))
// var argp uintptr
// if va != 0 {
@@ -762,6 +863,9 @@ func Xioctl(t *TLS, fd int32, request ulong, va uintptr) int32 {
// int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nfds=%v timeout=%v, (%v:)", t, nfds, timeout, origin(2))
+ }
panic(todo(""))
// n, err := unix.Select(
// int(nfds),
@@ -780,6 +884,9 @@ func Xselect(t *TLS, nfds int32, readfds, writefds, exceptfds, timeout uintptr)
// int mkfifo(const char *pathname, mode_t mode);
func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
panic(todo(""))
// if err := unix.Mkfifo(GoString(pathname), mode); err != nil {
// t.setErrno(err)
@@ -791,6 +898,9 @@ func Xmkfifo(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
// mode_t umask(mode_t mask);
func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
+ if __ccgo_strace {
+ trc("t=%v mask=%v, (%v:)", t, mask, origin(2))
+ }
panic(todo(""))
// n, _, _ := unix.Syscall(unix.SYS_UMASK, uintptr(mask), 0, 0)
// return types.Mode_t(n)
@@ -798,6 +908,9 @@ func Xumask(t *TLS, mask types.Mode_t) types.Mode_t {
// int execvp(const char *file, char *const argv[]);
func Xexecvp(t *TLS, file, argv uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v argv=%v, (%v:)", t, argv, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_EXECVE, file, argv, Environ()); err != 0 {
// t.setErrno(err)
@@ -809,6 +922,9 @@ func Xexecvp(t *TLS, file, argv uintptr) int32 {
// pid_t waitpid(pid_t pid, int *wstatus, int options);
func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid_t {
+ if __ccgo_strace {
+ trc("t=%v pid=%v wstatus=%v optname=%v, (%v:)", t, pid, wstatus, optname, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall6(unix.SYS_WAIT4, uintptr(pid), wstatus, uintptr(optname), 0, 0, 0)
// if err != 0 {
@@ -821,6 +937,9 @@ func Xwaitpid(t *TLS, pid types.Pid_t, wstatus uintptr, optname int32) types.Pid
// int uname(struct utsname *buf);
func Xuname(t *TLS, buf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v, (%v:)", t, buf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UNAME, buf, 0, 0); err != 0 {
// t.setErrno(err)
@@ -832,16 +951,25 @@ func Xuname(t *TLS, buf uintptr) int32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xgetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
return Xsetrlimit64(t, resource, rlim)
}
// int setrlimit(int resource, const struct rlimit *rlim);
func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -858,11 +986,17 @@ func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// pid_t getpid(void);
func Xgetpid(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return int32(os.Getpid())
}
// int system(const char *command);
func Xsystem(t *TLS, command uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v command=%v, (%v:)", t, command, origin(2))
+ }
s := GoString(command)
if command == 0 {
panic(todo(""))
@@ -897,6 +1031,9 @@ func Xsystem(t *TLS, command uintptr) int32 {
// struct passwd *getpwuid(uid_t uid);
func Xgetpwuid(t *TLS, uid uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v uid=%v, (%v:)", t, uid, origin(2))
+ }
panic(todo(""))
// f, err := os.Open("/etc/passwd")
// if err != nil {
@@ -955,26 +1092,41 @@ func Xgetpwuid(t *TLS, uid uint32) uintptr {
// int setvbuf(FILE *stream, char *buf, int mode, size_t size);
func Xsetvbuf(t *TLS, stream, buf uintptr, mode int32, size types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v mode=%v size=%v, (%v:)", t, buf, mode, size, origin(2))
+ }
return 0 //TODO
}
// int raise(int sig);
func Xraise(t *TLS, sig int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sig=%v, (%v:)", t, sig, origin(2))
+ }
panic(todo(""))
}
// int backtrace(void **buffer, int size);
func Xbacktrace(t *TLS, buf uintptr, size int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v size=%v, (%v:)", t, buf, size, origin(2))
+ }
panic(todo(""))
}
// void backtrace_symbols_fd(void *const *buffer, int size, int fd);
func Xbacktrace_symbols_fd(t *TLS, buffer uintptr, size, fd int32) {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v fd=%v, (%v:)", t, buffer, fd, origin(2))
+ }
panic(todo(""))
}
// int fileno(FILE *stream);
func Xfileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
if stream == 0 {
t.setErrno(errno.EBADF)
return -1
@@ -1152,11 +1304,17 @@ func Xfileno(t *TLS, stream uintptr) int32 {
// int mkstemps(char *template, int suffixlen);
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2))
+ }
return Xmkstemps64(t, template, suffixlen)
}
// int mkstemps(char *template, int suffixlen);
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v suffixlen=%v, (%v:)", t, template, suffixlen, origin(2))
+ }
panic(todo(""))
// len := uintptr(Xstrlen(t, template))
// x := template + uintptr(len-6) - uintptr(suffixlen)
@@ -1178,6 +1336,9 @@ func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
// int mkstemp(char *template);
func Xmkstemp64(t *TLS, template uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v template=%v, (%v:)", t, template, origin(2))
+ }
return Xmkstemps64(t, template, 0)
}
@@ -1240,6 +1401,9 @@ type ftstream struct {
// FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v path_argv=%v options=%v compar=%v, (%v:)", t, path_argv, options, compar, origin(2))
+ }
panic(todo(""))
// f := &ftstream{}
//
@@ -1345,11 +1509,17 @@ func Xfts64_open(t *TLS, path_argv uintptr, options int32, compar uintptr) uintp
// FTSENT *fts_read(FTS *ftsp);
func Xfts_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_read(t, ftsp)
}
// FTSENT *fts_read(FTS *ftsp);
func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
panic(todo(""))
// f := winGetObject(ftsp).(*ftstream)
// if f.x == len(f.s) {
@@ -1367,11 +1537,17 @@ func Xfts64_read(t *TLS, ftsp uintptr) uintptr {
// int fts_close(FTS *ftsp);
func Xfts_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
return Xfts64_close(t, ftsp)
}
// int fts_close(FTS *ftsp);
func Xfts64_close(t *TLS, ftsp uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ftsp=%v, (%v:)", t, ftsp, origin(2))
+ }
panic(todo(""))
// winGetObject(ftsp).(*ftstream).close(t)
// removeObject(ftsp)
@@ -1380,6 +1556,9 @@ func Xfts64_close(t *TLS, ftsp uintptr) int32 {
// void tzset (void);
func Xtzset(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
//TODO
}
@@ -1387,37 +1566,58 @@ var strerrorBuf [256]byte
// char *strerror(int errnum);
func Xstrerror(t *TLS, errnum int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errnum=%v, (%v:)", t, errnum, origin(2))
+ }
copy((*RawMem)(unsafe.Pointer(&strerrorBuf[0]))[:len(strerrorBuf):len(strerrorBuf)], fmt.Sprintf("errno %d\x00", errnum))
return uintptr(unsafe.Pointer(&strerrorBuf[0]))
}
// void *dlopen(const char *filename, int flags);
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v filename=%v flags=%v, (%v:)", t, filename, flags, origin(2))
+ }
panic(todo(""))
}
// char *dlerror(void);
func Xdlerror(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int dlclose(void *handle);
func Xdlclose(t *TLS, handle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
panic(todo(""))
}
// void *dlsym(void *handle, const char *symbol);
func Xdlsym(t *TLS, handle, symbol uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v symbol=%v, (%v:)", t, symbol, origin(2))
+ }
panic(todo(""))
}
// void perror(const char *s);
func Xperror(t *TLS, s uintptr) {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func Xpclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
@@ -1425,17 +1625,26 @@ var gai_strerrorBuf [100]byte
// const char *gai_strerror(int errcode);
func Xgai_strerror(t *TLS, errcode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v errcode=%v, (%v:)", t, errcode, origin(2))
+ }
copy(gai_strerrorBuf[:], fmt.Sprintf("gai error %d\x00", errcode))
return uintptr(unsafe.Pointer(&gai_strerrorBuf))
}
// int tcgetattr(int fd, struct termios *termios_p);
func Xtcgetattr(t *TLS, fd int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v termios_p=%v, (%v:)", t, fd, termios_p, origin(2))
+ }
panic(todo(""))
}
// int tcsetattr(int fd, int optional_actions, const struct termios *termios_p);
func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v optional_actions=%v termios_p=%v, (%v:)", t, optional_actions, termios_p, origin(2))
+ }
panic(todo(""))
}
@@ -1446,22 +1655,34 @@ func Xtcsetattr(t *TLS, fd, optional_actions int32, termios_p uintptr) int32 {
// int cfsetospeed(struct termios *termios_p, speed_t speed);
func Xcfsetospeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// int cfsetispeed(struct termios *termios_p, speed_t speed);
func Xcfsetispeed(t *TLS, termios_p uintptr, speed uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v termios_p=%v speed=%v, (%v:)", t, termios_p, speed, origin(2))
+ }
panic(todo(""))
}
// pid_t fork(void);
func Xfork(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
t.setErrno(errno.ENOSYS)
return -1
}
// char *setlocale(int category, const char *locale);
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v category=%v locale=%v, (%v:)", t, category, locale, origin(2))
+ }
return 0 //TODO
}
@@ -1472,11 +1693,17 @@ func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
// FILE *popen(const char *command, const char *type);
func Xpopen(t *TLS, command, type1 uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v type1=%v, (%v:)", t, type1, origin(2))
+ }
panic(todo(""))
}
// char *realpath(const char *path, char *resolved_path);
func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v resolved_path=%v, (%v:)", t, resolved_path, origin(2))
+ }
s, err := filepath.EvalSymlinks(GoString(path))
if err != nil {
if os.IsNotExist(err) {
@@ -1505,6 +1732,9 @@ func Xrealpath(t *TLS, path, resolved_path uintptr) uintptr {
// struct tm *gmtime_r(const time_t *timep, struct tm *result);
func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v result=%v, (%v:)", t, result, origin(2))
+ }
panic(todo(""))
}
@@ -1518,6 +1748,9 @@ func Xgmtime_r(t *TLS, timep, result uintptr) uintptr {
// }
func Xabort(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
// if dmesgs {
// dmesg("%v:\n%s", origin(1), debug.Stack())
@@ -1538,6 +1771,9 @@ func Xabort(t *TLS) {
// int fflush(FILE *stream);
func Xfflush(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1553,6 +1789,9 @@ func Xfflush(t *TLS, stream uintptr) int32 {
// size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1578,6 +1817,9 @@ func Xfread(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types
// size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v nmemb=%v stream=%v, (%v:)", t, ptr, nmemb, stream, origin(2))
+ }
if ptr == 0 || size == 0 {
return 0
}
@@ -1605,6 +1847,9 @@ func Xfwrite(t *TLS, ptr uintptr, size, nmemb types.Size_t, stream uintptr) type
// int fclose(FILE *stream);
func Xfclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1615,6 +1860,9 @@ func Xfclose(t *TLS, stream uintptr) int32 {
// int fputc(int c, FILE *stream);
func Xfputc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1628,6 +1876,9 @@ func Xfputc(t *TLS, c int32, stream uintptr) int32 {
// int fseek(FILE *stream, long offset, int whence);
func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v offset=%v whence=%v, (%v:)", t, stream, offset, whence, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1649,6 +1900,9 @@ func Xfseek(t *TLS, stream uintptr, offset long, whence int32) int32 {
// long ftell(FILE *stream);
func Xftell(t *TLS, stream uintptr) long {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1669,6 +1923,9 @@ func Xftell(t *TLS, stream uintptr) long {
// int ferror(FILE *stream);
func Xferror(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1680,6 +1937,9 @@ func Xferror(t *TLS, stream uintptr) int32 {
// int getc(FILE *stream);
func Xfgetc(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1696,16 +1956,25 @@ func Xfgetc(t *TLS, stream uintptr) int32 {
// int ungetc(int c, FILE *stream);
func Xungetc(t *TLS, c int32, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v stream=%v, (%v:)", t, c, stream, origin(2))
+ }
panic(todo(""))
}
// int fscanf(FILE *stream, const char *format, ...);
func Xfscanf(t *TLS, stream, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
panic(todo(""))
}
// int fputs(const char *s, FILE *stream);
func Xfputs(t *TLS, s, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -1821,51 +2090,81 @@ func Xfputs(t *TLS, s, stream uintptr) int32 {
// _CRTIMP extern int *__cdecl _errno(void); // /usr/share/mingw-w64/include/errno.h:17:
func X_errno(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return t.errnop
}
// int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg);
func X__ms_vfscanf(t *TLS, stream, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int vsscanf(const char *str, const char *format, va_list ap);
func X__ms_vsscanf(t *TLS, str, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int vscanf(const char *format, va_list ap);
func X__ms_vscanf(t *TLS, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int vsnprintf(char *str, size_t size, const char *format, va_list ap);
func X__ms_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v ap=%v, (%v:)", t, str, size, ap, origin(2))
+ }
return Xvsnprintf(t, str, size, format, ap)
}
// int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr;);
func X__ms_vfwscanf(t *TLS, stream uintptr, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v ap=%v, (%v:)", t, stream, ap, origin(2))
+ }
panic(todo(""))
}
// int vwscanf(const wchar_t * restrict format, va_list arg);
func X__ms_vwscanf(t *TLS, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int _vsnwprintf(wchar_t *buffer, size_t count, const wchar_t *format, va_list argptr);
func X_vsnwprintf(t *TLS, buffer uintptr, count types.Size_t, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v count=%v ap=%v, (%v:)", t, buffer, count, ap, origin(2))
+ }
panic(todo(""))
}
// int vswscanf(const wchar_t *buffer, const wchar_t *format, va_list arglist);
func X__ms_vswscanf(t *TLS, stream uintptr, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v ap=%v, (%v:)", t, stream, ap, origin(2))
+ }
panic(todo(""))
}
// __acrt_iob_func
func X__acrt_iob_func(t *TLS, fd uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
f, ok := fdToFile(int32(fd))
if !ok {
@@ -1881,6 +2180,9 @@ func X__acrt_iob_func(t *TLS, fd uint32) uintptr {
//
// );
func XSetEvent(t *TLS, hEvent uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hEvent=%v, (%v:)", t, hEvent, origin(2))
+ }
r0, _, err := syscall.Syscall(procSetEvent.Addr(), 1, hEvent, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -1895,6 +2197,9 @@ func XSetEvent(t *TLS, hEvent uintptr) int32 {
//
// );
func X_stricmp(t *TLS, string1, string2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v, (%v:)", t, string2, origin(2))
+ }
var s1 = strings.ToLower(GoString(string1))
var s2 = strings.ToLower(GoString(string2))
return int32(strings.Compare(s1, s2))
@@ -1908,6 +2213,9 @@ func X_stricmp(t *TLS, string1, string2 uintptr) int32 {
//
// );
func XHeapFree(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v lpMem=%v, (%v:)", t, hHeap, dwFlags, lpMem, origin(2))
+ }
r0, _, err := syscall.Syscall(procHeapFree.Addr(), 3, hHeap, uintptr(dwFlags), lpMem)
if err != 0 {
t.setErrno(err)
@@ -1917,6 +2225,9 @@ func XHeapFree(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 {
// HANDLE GetProcessHeap();
func XGetProcessHeap(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetProcessHeap.Addr(), 0, 0, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -1932,6 +2243,9 @@ func XGetProcessHeap(t *TLS) uintptr {
//
// );
func XHeapAlloc(t *TLS, hHeap uintptr, dwFlags uint32, dwBytes types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v dwBytes=%v, (%v:)", t, hHeap, dwFlags, dwBytes, origin(2))
+ }
r0, _, err := syscall.Syscall(procHeapAlloc.Addr(), 3, hHeap, uintptr(dwFlags), uintptr(dwBytes))
if r0 == 0 {
t.setErrno(err)
@@ -1977,6 +2291,9 @@ func XWspiapiGetAddrInfo(t *TLS, _ ...interface{}) int32 {
//
// );
func Xwcscmp(t *TLS, string1, string2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v, (%v:)", t, string2, origin(2))
+ }
var s1 = goWideString(string1)
var s2 = goWideString(string2)
return int32(strings.Compare(s1, s2))
@@ -1984,6 +2301,9 @@ func Xwcscmp(t *TLS, string1, string2 uintptr) int32 {
// BOOL IsDebuggerPresent();
func XIsDebuggerPresent(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
@@ -1997,6 +2317,9 @@ func XExitProcess(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetVersionExW(t *TLS, lpVersionInformation uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpVersionInformation=%v, (%v:)", t, lpVersionInformation, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetVersionExW.Addr(), 1, lpVersionInformation, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -2021,6 +2344,9 @@ func XGetVolumeNameForVolumeMountPointW(t *TLS, _ ...interface{}) int32 {
//
// );
func Xwcslen(t *TLS, str uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v str=%v, (%v:)", t, str, origin(2))
+ }
r0, _, _ := syscall.Syscall(procLstrlenW.Addr(), 1, str, 0, 0)
return types.Size_t(r0)
}
@@ -2031,6 +2357,9 @@ func Xwcslen(t *TLS, str uintptr) types.Size_t {
//
// );
func XGetStdHandle(t *TLS, nStdHandle uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v nStdHandle=%v, (%v:)", t, nStdHandle, origin(2))
+ }
h, err := syscall.GetStdHandle(int(nStdHandle))
if err != nil {
panic("no console")
@@ -2044,6 +2373,9 @@ func XGetStdHandle(t *TLS, nStdHandle uint32) uintptr {
//
// );
func XCloseHandle(t *TLS, hObject uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hObject=%v, (%v:)", t, hObject, origin(2))
+ }
r := syscall.CloseHandle(syscall.Handle(hObject))
if r != nil {
return errno.EINVAL
@@ -2053,6 +2385,9 @@ func XCloseHandle(t *TLS, hObject uintptr) int32 {
// DWORD GetLastError();
func XGetLastError(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
var rv = *(*int32)(unsafe.Pointer(t.errnop))
return uint32(rv)
@@ -2069,6 +2404,9 @@ func XGetLastError(t *TLS) uint32 {
//
// );
func XSetFilePointer(t *TLS, hFile uintptr, lDistanceToMove long, lpDistanceToMoveHigh uintptr, dwMoveMethod uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v lDistanceToMove=%v lpDistanceToMoveHigh=%v dwMoveMethod=%v, (%v:)", t, hFile, lDistanceToMove, lpDistanceToMoveHigh, dwMoveMethod, origin(2))
+ }
r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, hFile, uintptr(lDistanceToMove), lpDistanceToMoveHigh, uintptr(dwMoveMethod), 0, 0)
var uOff = uint32(r0)
if uOff == 0xffffffff {
@@ -2087,6 +2425,9 @@ func XSetFilePointer(t *TLS, hFile uintptr, lDistanceToMove long, lpDistanceToMo
//
// );
func XSetEndOfFile(t *TLS, hFile uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v, (%v:)", t, hFile, origin(2))
+ }
err := syscall.SetEndOfFile(syscall.Handle(hFile))
if err != nil {
t.setErrno(err)
@@ -2105,6 +2446,9 @@ func XSetEndOfFile(t *TLS, hFile uintptr) int32 {
//
// );
func XReadFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToRead uint32, lpNumberOfBytesRead, lpOverlapped uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nNumberOfBytesToRead=%v lpOverlapped=%v, (%v:)", t, lpBuffer, nNumberOfBytesToRead, lpOverlapped, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5,
hFile, lpBuffer, uintptr(nNumberOfBytesToRead), uintptr(lpNumberOfBytesRead), uintptr(lpOverlapped), 0)
if r1 == 0 {
@@ -2128,6 +2472,9 @@ func XReadFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToRead uint32, lpN
//
// );
func XWriteFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToWrite uint32, lpNumberOfBytesWritten, lpOverlapped uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nNumberOfBytesToWrite=%v lpOverlapped=%v, (%v:)", t, lpBuffer, nNumberOfBytesToWrite, lpOverlapped, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5,
hFile, lpBuffer, uintptr(nNumberOfBytesToWrite), lpNumberOfBytesWritten, lpOverlapped, 0)
if r1 == 0 {
@@ -2147,6 +2494,9 @@ func XWriteFile(t *TLS, hFile, lpBuffer uintptr, nNumberOfBytesToWrite uint32, l
//
// );
func XGetFileAttributesW(t *TLS, lpFileName uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v, (%v:)", t, lpFileName, origin(2))
+ }
attrs, err := syscall.GetFileAttributes((*uint16)(unsafe.Pointer(lpFileName)))
if attrs == syscall.INVALID_FILE_ATTRIBUTES {
if err != nil {
@@ -2170,6 +2520,9 @@ func XGetFileAttributesW(t *TLS, lpFileName uintptr) uint32 {
//
// );
func XCreateFileW(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint32, lpSecurityAttributes uintptr, dwCreationDisposition, dwFlagsAndAttributes uint32, hTemplateFile uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v dwShareMode=%v lpSecurityAttributes=%v dwFlagsAndAttributes=%v hTemplateFile=%v, (%v:)", t, lpFileName, dwShareMode, lpSecurityAttributes, dwFlagsAndAttributes, hTemplateFile, origin(2))
+ }
r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, lpFileName, uintptr(dwDesiredAccess), uintptr(dwShareMode), lpSecurityAttributes,
uintptr(dwCreationDisposition), uintptr(dwFlagsAndAttributes), hTemplateFile, 0, 0)
@@ -2197,6 +2550,9 @@ func XCreateFileW(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint3
//
// );
func XDuplicateHandle(t *TLS, hSourceProcessHandle, hSourceHandle, hTargetProcessHandle, lpTargetHandle uintptr, dwDesiredAccess uint32, bInheritHandle int32, dwOptions uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpTargetHandle=%v dwDesiredAccess=%v bInheritHandle=%v dwOptions=%v, (%v:)", t, lpTargetHandle, dwDesiredAccess, bInheritHandle, dwOptions, origin(2))
+ }
r0, _, err := syscall.Syscall9(procDuplicateHandle.Addr(), 7, hSourceProcessHandle, hSourceHandle, hTargetProcessHandle,
lpTargetHandle, uintptr(dwDesiredAccess), uintptr(bInheritHandle), uintptr(dwOptions), 0, 0)
if r0 == 0 {
@@ -2207,6 +2563,9 @@ func XDuplicateHandle(t *TLS, hSourceProcessHandle, hSourceHandle, hTargetProces
// HANDLE GetCurrentProcess();
func XGetCurrentProcess(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0)
if r0 == 0 {
if e1 != 0 {
@@ -2224,6 +2583,9 @@ func XGetCurrentProcess(t *TLS) uintptr {
//
// );
func XFlushFileBuffers(t *TLS, hFile uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v, (%v:)", t, hFile, origin(2))
+ }
err := syscall.FlushFileBuffers(syscall.Handle(hFile))
if err != nil {
t.setErrno(err)
@@ -2239,6 +2601,9 @@ func XFlushFileBuffers(t *TLS, hFile uintptr) int32 {
//
// );
func XGetFileType(t *TLS, hFile uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v, (%v:)", t, hFile, origin(2))
+ }
n, err := syscall.GetFileType(syscall.Handle(hFile))
if err != nil {
t.setErrno(err)
@@ -2253,6 +2618,9 @@ func XGetFileType(t *TLS, hFile uintptr) uint32 {
//
// );
func XGetConsoleMode(t *TLS, hConsoleHandle, lpMode uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpMode=%v, (%v:)", t, lpMode, origin(2))
+ }
err := syscall.GetConsoleMode(syscall.Handle(hConsoleHandle), (*uint32)(unsafe.Pointer(lpMode)))
if err != nil {
t.setErrno(err)
@@ -2268,6 +2636,9 @@ func XGetConsoleMode(t *TLS, hConsoleHandle, lpMode uintptr) int32 {
//
// );
func XGetCommState(t *TLS, hFile, lpDCB uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpDCB=%v, (%v:)", t, lpDCB, origin(2))
+ }
r1, _, err := syscall.Syscall(procGetCommState.Addr(), 2, hFile, lpDCB, 0)
if r1 == 0 {
t.setErrno(err)
@@ -2284,6 +2655,9 @@ func XGetCommState(t *TLS, hFile, lpDCB uintptr) int32 {
//
// );
func X_wcsnicmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v count=%v, (%v:)", t, string2, count, origin(2))
+ }
var s1 = strings.ToLower(goWideString(string1))
var l1 = len(s1)
@@ -2316,6 +2690,9 @@ func X_wcsnicmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 {
//
// );
func XReadConsoleW(t *TLS, hConsoleInput, lpBuffer uintptr, nNumberOfCharsToRead uint32, lpNumberOfCharsRead, pInputControl uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nNumberOfCharsToRead=%v pInputControl=%v, (%v:)", t, lpBuffer, nNumberOfCharsToRead, pInputControl, origin(2))
+ }
rv, _, err := syscall.Syscall6(procReadConsoleW.Addr(), 5, hConsoleInput,
lpBuffer, uintptr(nNumberOfCharsToRead), lpNumberOfCharsRead, pInputControl, 0)
@@ -2336,6 +2713,9 @@ func XReadConsoleW(t *TLS, hConsoleInput, lpBuffer uintptr, nNumberOfCharsToRead
//
// );
func XWriteConsoleW(t *TLS, hConsoleOutput, lpBuffer uintptr, nNumberOfCharsToWrite uint32, lpNumberOfCharsWritten, lpReserved uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nNumberOfCharsToWrite=%v lpReserved=%v, (%v:)", t, lpBuffer, nNumberOfCharsToWrite, lpReserved, origin(2))
+ }
rv, _, err := syscall.Syscall6(procWriteConsoleW.Addr(), 5, hConsoleOutput,
lpBuffer, uintptr(nNumberOfCharsToWrite), lpNumberOfCharsWritten, lpReserved, 0)
if rv == 0 {
@@ -2351,6 +2731,9 @@ func XWriteConsoleW(t *TLS, hConsoleOutput, lpBuffer uintptr, nNumberOfCharsToWr
//
// );
func XWaitForSingleObject(t *TLS, hHandle uintptr, dwMilliseconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v hHandle=%v dwMilliseconds=%v, (%v:)", t, hHandle, dwMilliseconds, origin(2))
+ }
rv, err := syscall.WaitForSingleObject(syscall.Handle(hHandle), dwMilliseconds)
if err != nil {
t.setErrno(err)
@@ -2364,6 +2747,9 @@ func XWaitForSingleObject(t *TLS, hHandle uintptr, dwMilliseconds uint32) uint32
//
// );
func XResetEvent(t *TLS, hEvent uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hEvent=%v, (%v:)", t, hEvent, origin(2))
+ }
rv, _, err := syscall.Syscall(procResetEvent.Addr(), 1, hEvent, 0, 0)
if rv == 0 {
t.setErrno(err)
@@ -2380,6 +2766,9 @@ func XResetEvent(t *TLS, hEvent uintptr) int32 {
//
// );
func XPeekConsoleInputW(t *TLS, hConsoleInput, lpBuffer uintptr, nLength uint32, lpNumberOfEventsRead uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nLength=%v lpNumberOfEventsRead=%v, (%v:)", t, lpBuffer, nLength, lpNumberOfEventsRead, origin(2))
+ }
r0, _, err := syscall.Syscall6(procPeekConsoleInputW.Addr(), 4, hConsoleInput, lpBuffer, uintptr(nLength), lpNumberOfEventsRead, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -2395,11 +2784,17 @@ func XPeekConsoleInputW(t *TLS, hConsoleInput, lpBuffer uintptr, nLength uint32,
//
// );
func XwsprintfA(t *TLS, buf, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v args=%v, (%v:)", t, args, origin(2))
+ }
return Xsprintf(t, buf, format, args)
}
// UINT WINAPI GetConsoleCP(void);
func XGetConsoleCP(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -2426,6 +2821,9 @@ func XGetConsoleCP(t *TLS) uint32 {
//
// );
func XCreateEventW(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialState int32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpEventAttributes=%v bInitialState=%v lpName=%v, (%v:)", t, lpEventAttributes, bInitialState, lpName, origin(2))
+ }
r0, _, err := syscall.Syscall6(procCreateEventW.Addr(), 4, lpEventAttributes, uintptr(bManualReset),
uintptr(bInitialState), lpName, 0, 0)
if r0 == 0 {
@@ -2467,6 +2865,9 @@ func ThreadProc(p uintptr) uintptr {
//
// );
func XCreateThread(t *TLS, lpThreadAttributes uintptr, dwStackSize types.Size_t, lpStartAddress, lpParameter uintptr, dwCreationFlags uint32, lpThreadId uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpThreadAttributes=%v dwStackSize=%v lpParameter=%v dwCreationFlags=%v lpThreadId=%v, (%v:)", t, lpThreadAttributes, dwStackSize, lpParameter, dwCreationFlags, lpThreadId, origin(2))
+ }
f := (*struct{ f func(*TLS, uintptr) uint32 })(unsafe.Pointer(&struct{ uintptr }{lpStartAddress})).f
var tAdp = ThreadAdapter{threadFunc: f, tls: NewTLS(), param: lpParameter}
tAdp.token = addObject(&tAdp)
@@ -2486,6 +2887,9 @@ func XCreateThread(t *TLS, lpThreadAttributes uintptr, dwStackSize types.Size_t,
//
// );
func XSetThreadPriority(t *TLS, hThread uintptr, nPriority int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hThread=%v nPriority=%v, (%v:)", t, hThread, nPriority, origin(2))
+ }
//r0, _, err := syscall.Syscall(procSetThreadPriority.Addr(), 2, hThread, uintptr(nPriority), 0)
//if r0 == 0 {
@@ -2502,6 +2906,9 @@ func XSetThreadPriority(t *TLS, hThread uintptr, nPriority int32) int32 {
//
// );
func XSetConsoleMode(t *TLS, hConsoleHandle uintptr, dwMode uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hConsoleHandle=%v dwMode=%v, (%v:)", t, hConsoleHandle, dwMode, origin(2))
+ }
rv, _, err := syscall.Syscall(procSetConsoleMode.Addr(), 2, hConsoleHandle, uintptr(dwMode), 0)
if rv == 0 {
t.setErrno(err)
@@ -2523,6 +2930,9 @@ func XClearCommError(t *TLS, _ ...interface{}) int32 {
//
// );
func XDeleteCriticalSection(t *TLS, lpCriticalSection uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpCriticalSection=%v, (%v:)", t, lpCriticalSection, origin(2))
+ }
syscall.Syscall(procDeleteCriticalSection.Addr(), 1, lpCriticalSection, 0, 0)
}
@@ -2532,15 +2942,37 @@ func XDeleteCriticalSection(t *TLS, lpCriticalSection uintptr) {
//
// );
func XEnterCriticalSection(t *TLS, lpCriticalSection uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpCriticalSection=%v, (%v:)", t, lpCriticalSection, origin(2))
+ }
syscall.Syscall(procEnterCriticalSection.Addr(), 1, lpCriticalSection, 0, 0)
}
+// BOOL TryEnterCriticalSection(
+//
+// LPCRITICAL_SECTION lpCriticalSection
+//
+// );
+func XTryEnterCriticalSection(t *TLS, lpCriticalSection uintptr) (r int32) {
+ if __ccgo_strace {
+ trc("t=%v lpCriticalSection=%v, (%v:)", t, lpCriticalSection, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procTryEnterCriticalSection.Addr(), lpCriticalSection)
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return int32(r0)
+}
+
// void LeaveCriticalSection(
//
// LPCRITICAL_SECTION lpCriticalSection
//
// );
func XLeaveCriticalSection(t *TLS, lpCriticalSection uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpCriticalSection=%v, (%v:)", t, lpCriticalSection, origin(2))
+ }
syscall.Syscall(procLeaveCriticalSection.Addr(), 1, lpCriticalSection, 0, 0)
}
@@ -2562,6 +2994,9 @@ func XSetCommTimeouts(t *TLS, _ ...interface{}) int32 {
//
// );
func XInitializeCriticalSection(t *TLS, lpCriticalSection uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpCriticalSection=%v, (%v:)", t, lpCriticalSection, origin(2))
+ }
// InitializeCriticalSection always succeeds, even in low memory situations.
syscall.Syscall(procInitializeCriticalSection.Addr(), 1, lpCriticalSection, 0, 0)
}
@@ -2593,6 +3028,9 @@ func XGetCommModemStatus(t *TLS, _ ...interface{}) int32 {
//
// );
func XMoveFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpNewFileName=%v, (%v:)", t, lpNewFileName, origin(2))
+ }
r0, _, err := syscall.Syscall(procMoveFileW.Addr(), 2, lpExistingFileName, lpNewFileName, 0)
if err != 0 {
t.setErrno(err)
@@ -2609,6 +3047,9 @@ func XMoveFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr) int32 {
//
// );
func XGetFullPathNameW(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v nBufferLength=%v lpFilePart=%v, (%v:)", t, lpFileName, nBufferLength, lpFilePart, origin(2))
+ }
r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, lpFileName, uintptr(nBufferLength), uintptr(lpBuffer), uintptr(lpFilePart), 0, 0)
n := uint32(r0)
if n == 0 {
@@ -2627,6 +3068,9 @@ func XGetFullPathNameW(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffe
//
// );
func XCharLowerW(t *TLS, lpsz uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpsz=%v, (%v:)", t, lpsz, origin(2))
+ }
panic(todo(""))
}
@@ -2637,6 +3081,9 @@ func XCharLowerW(t *TLS, lpsz uintptr) uintptr {
//
// );
func XCreateDirectoryW(t *TLS, lpPathName, lpSecurityAttributes uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpSecurityAttributes=%v, (%v:)", t, lpSecurityAttributes, origin(2))
+ }
err := syscall.CreateDirectory((*uint16)(unsafe.Pointer(lpPathName)),
(*syscall.SecurityAttributes)(unsafe.Pointer(lpSecurityAttributes)))
if err != nil {
@@ -2653,6 +3100,9 @@ func XCreateDirectoryW(t *TLS, lpPathName, lpSecurityAttributes uintptr) int32 {
//
// );
func XSetFileAttributesW(t *TLS, lpFileName uintptr, dwFileAttributes uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v dwFileAttributes=%v, (%v:)", t, lpFileName, dwFileAttributes, origin(2))
+ }
err := syscall.SetFileAttributes((*uint16)(unsafe.Pointer(lpFileName)), dwFileAttributes)
if err != nil {
t.setErrno(err)
@@ -2670,6 +3120,9 @@ func XSetFileAttributesW(t *TLS, lpFileName uintptr, dwFileAttributes uint32) in
//
// );
func XGetTempFileNameW(t *TLS, lpPathName, lpPrefixString uintptr, uUnique uint32, lpTempFileName uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpPrefixString=%v uUnique=%v lpTempFileName=%v, (%v:)", t, lpPrefixString, uUnique, lpTempFileName, origin(2))
+ }
r0, _, e1 := syscall.Syscall6(procGetTempFileNameW.Addr(), 4, lpPathName, lpPrefixString, uintptr(uUnique), lpTempFileName, 0, 0)
if r0 == 0 {
t.setErrno(e1)
@@ -2685,6 +3138,9 @@ func XGetTempFileNameW(t *TLS, lpPathName, lpPrefixString uintptr, uUnique uint3
//
// );
func XCopyFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr, bFailIfExists int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpNewFileName=%v bFailIfExists=%v, (%v:)", t, lpNewFileName, bFailIfExists, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procCopyFileW.Addr(), 3, lpExistingFileName, lpNewFileName, uintptr(bFailIfExists))
if r0 == 0 {
t.setErrno(e1)
@@ -2698,6 +3154,9 @@ func XCopyFileW(t *TLS, lpExistingFileName, lpNewFileName uintptr, bFailIfExists
//
// );
func XDeleteFileW(t *TLS, lpFileName uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v, (%v:)", t, lpFileName, origin(2))
+ }
err := syscall.DeleteFile((*uint16)(unsafe.Pointer(lpFileName)))
if err != nil {
t.setErrno(err)
@@ -2712,6 +3171,9 @@ func XDeleteFileW(t *TLS, lpFileName uintptr) int32 {
//
// );
func XRemoveDirectoryW(t *TLS, lpPathName uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpPathName=%v, (%v:)", t, lpPathName, origin(2))
+ }
err := syscall.RemoveDirectory((*uint16)(unsafe.Pointer(lpPathName)))
if err != nil {
t.setErrno(err)
@@ -2722,6 +3184,9 @@ func XRemoveDirectoryW(t *TLS, lpPathName uintptr) int32 {
// HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData);
func XFindFirstFileW(t *TLS, lpFileName, lpFindFileData uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpFindFileData=%v, (%v:)", t, lpFindFileData, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, lpFileName, lpFindFileData, 0)
handle := syscall.Handle(r0)
if handle == syscall.InvalidHandle {
@@ -2745,6 +3210,9 @@ func XFindFirstFileW(t *TLS, lpFileName, lpFindFileData uintptr) uintptr {
//
// );
func XFindFirstFileExW(t *TLS, lpFileName uintptr, fInfoLevelId int32, lpFindFileData uintptr, fSearchOp int32, lpSearchFilter uintptr, dwAdditionalFlags uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v fInfoLevelId=%v lpFindFileData=%v fSearchOp=%v lpSearchFilter=%v dwAdditionalFlags=%v, (%v:)", t, lpFileName, fInfoLevelId, lpFindFileData, fSearchOp, lpSearchFilter, dwAdditionalFlags, origin(2))
+ }
r0, _, e1 := syscall.Syscall6(procFindFirstFileExW.Addr(), 6, lpFileName, uintptr(fInfoLevelId), lpFindFileData, uintptr(fSearchOp), lpSearchFilter, uintptr(dwAdditionalFlags))
handle := syscall.Handle(r0)
if handle == syscall.InvalidHandle {
@@ -2759,6 +3227,9 @@ func XFindFirstFileExW(t *TLS, lpFileName uintptr, fInfoLevelId int32, lpFindFil
// BOOL FindClose(HANDLE hFindFile);
func XFindClose(t *TLS, hFindFile uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFindFile=%v, (%v:)", t, hFindFile, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, hFindFile, 0, 0)
if r0 == 0 {
if e1 != 0 {
@@ -2777,6 +3248,9 @@ func XFindClose(t *TLS, hFindFile uintptr) int32 {
//
// );
func XFindNextFileW(t *TLS, hFindFile, lpFindFileData uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFindFileData=%v, (%v:)", t, lpFindFileData, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, hFindFile, lpFindFileData, 0)
if r0 == 0 {
if e1 != 0 {
@@ -2795,6 +3269,9 @@ func XFindNextFileW(t *TLS, hFindFile, lpFindFileData uintptr) int32 {
//
// );
func XGetLogicalDriveStringsA(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v nBufferLength=%v lpBuffer=%v, (%v:)", t, nBufferLength, lpBuffer, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetLogicalDriveStringsA.Addr(), 2, uintptr(nBufferLength), lpBuffer, 0)
if err != 0 {
t.setErrno(err)
@@ -2815,6 +3292,9 @@ func XGetLogicalDriveStringsA(t *TLS, nBufferLength uint32, lpBuffer uintptr) ui
//
// );
func XGetVolumeInformationA(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, nVolumeNameSize uint32, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, lpFileSystemNameBuffer uintptr, nFileSystemNameSize uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpVolumeNameBuffer=%v nVolumeNameSize=%v lpFileSystemNameBuffer=%v nFileSystemNameSize=%v, (%v:)", t, lpVolumeNameBuffer, nVolumeNameSize, lpFileSystemNameBuffer, nFileSystemNameSize, origin(2))
+ }
r0, _, err := syscall.Syscall9(procGetVolumeInformationA.Addr(), 8,
lpRootPathName,
lpVolumeNameBuffer,
@@ -2840,6 +3320,9 @@ func XGetVolumeInformationA(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr,
//
// );
func XCreateHardLinkW(t *TLS, lpFileName, lpExistingFileName, lpSecurityAttributes uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpSecurityAttributes=%v, (%v:)", t, lpSecurityAttributes, origin(2))
+ }
r0, _, err := syscall.Syscall(procCreateHardLinkW.Addr(), 1, lpFileName, lpExistingFileName, lpSecurityAttributes)
if err != 0 {
t.setErrno(err)
@@ -2860,6 +3343,9 @@ func XCreateHardLinkW(t *TLS, lpFileName, lpExistingFileName, lpSecurityAttribut
//
// );
func XDeviceIoControl(t *TLS, hDevice uintptr, dwIoControlCode uint32, lpInBuffer uintptr, nInBufferSize uint32, lpOutBuffer uintptr, nOutBufferSize uint32, lpBytesReturned, lpOverlapped uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hDevice=%v dwIoControlCode=%v lpInBuffer=%v nInBufferSize=%v lpOutBuffer=%v nOutBufferSize=%v lpOverlapped=%v, (%v:)", t, hDevice, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpOverlapped, origin(2))
+ }
r0, _, err := syscall.Syscall9(procDeviceIoControl.Addr(), 8, hDevice, uintptr(dwIoControlCode), lpInBuffer,
uintptr(nInBufferSize), lpOutBuffer, uintptr(nOutBufferSize), lpBytesReturned, lpOverlapped, 0)
if r0 == 0 {
@@ -2876,6 +3362,9 @@ func XDeviceIoControl(t *TLS, hDevice uintptr, dwIoControlCode uint32, lpInBuffe
//
// );
func Xwcsncmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v count=%v, (%v:)", t, string2, count, origin(2))
+ }
var s1 = goWideString(string1)
var l1 = len(s1)
var s2 = goWideString(string2)
@@ -2908,6 +3397,9 @@ func Xwcsncmp(t *TLS, string1, string2 uintptr, count types.Size_t) int32 {
//
// );
func XMultiByteToWideChar(t *TLS, CodePage uint32, dwFlags uint32, lpMultiByteStr uintptr, cbMultiByte int32, lpWideCharStr uintptr, cchWideChar int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v CodePage=%v dwFlags=%v lpMultiByteStr=%v cbMultiByte=%v lpWideCharStr=%v cchWideChar=%v, (%v:)", t, CodePage, dwFlags, lpMultiByteStr, cbMultiByte, lpWideCharStr, cchWideChar, origin(2))
+ }
r1, _, _ := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6,
uintptr(CodePage), uintptr(dwFlags), uintptr(lpMultiByteStr),
uintptr(cbMultiByte), uintptr(lpWideCharStr), uintptr(cchWideChar))
@@ -2920,6 +3412,9 @@ func XMultiByteToWideChar(t *TLS, CodePage uint32, dwFlags uint32, lpMultiByteSt
//
// );
func XOutputDebugStringW(t *TLS, lpOutputString uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpOutputString=%v, (%v:)", t, lpOutputString, origin(2))
+ }
panic(todo(""))
}
@@ -2937,6 +3432,9 @@ func XMessageBeep(t *TLS, _ ...interface{}) int32 {
//
// );
func X_InterlockedCompareExchange(t *TLS, Destination uintptr, Exchange, Comparand long) long {
+ if __ccgo_strace {
+ trc("t=%v Destination=%v Comparand=%v, (%v:)", t, Destination, Comparand, origin(2))
+ }
// The function returns the initial value of the Destination parameter.
var v = *(*int32)(unsafe.Pointer(Destination))
@@ -2946,11 +3444,17 @@ func X_InterlockedCompareExchange(t *TLS, Destination uintptr, Exchange, Compara
// int rename(const char *oldpath, const char *newpath);
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
}
// BOOL AreFileApisANSI();
func XAreFileApisANSI(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, _ := syscall.Syscall(procAreFileApisANSI.Addr(), 0, 0, 0, 0)
return int32(r0)
@@ -2996,6 +3500,9 @@ func XCreateFileA(t *TLS, lpFileName uintptr, dwDesiredAccess, dwShareMode uint3
//
// );
func XCreateFileMappingA(t *TLS, hFile, lpFileMappingAttributes uintptr, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow uint32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpFileMappingAttributes=%v dwMaximumSizeLow=%v lpName=%v, (%v:)", t, lpFileMappingAttributes, dwMaximumSizeLow, lpName, origin(2))
+ }
panic(todo(""))
}
@@ -3010,6 +3517,9 @@ func XCreateFileMappingA(t *TLS, hFile, lpFileMappingAttributes uintptr, flProte
//
// );
func XCreateFileMappingW(t *TLS, hFile, lpFileMappingAttributes uintptr, flProtect, dwMaximumSizeHigh, dwMaximumSizeLow uint32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpFileMappingAttributes=%v dwMaximumSizeLow=%v lpName=%v, (%v:)", t, lpFileMappingAttributes, dwMaximumSizeLow, lpName, origin(2))
+ }
h, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, hFile, lpFileMappingAttributes, uintptr(flProtect),
uintptr(dwMaximumSizeHigh), uintptr(dwMaximumSizeLow), lpName)
if h == 0 {
@@ -3030,6 +3540,9 @@ func XCreateFileMappingW(t *TLS, hFile, lpFileMappingAttributes uintptr, flProte
//
// );
func XCreateMutexW(t *TLS, lpMutexAttributes uintptr, bInitialOwner int32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpMutexAttributes=%v bInitialOwner=%v lpName=%v, (%v:)", t, lpMutexAttributes, bInitialOwner, lpName, origin(2))
+ }
panic(todo(""))
}
@@ -3039,6 +3552,9 @@ func XCreateMutexW(t *TLS, lpMutexAttributes uintptr, bInitialOwner int32, lpNam
//
// );
func XDeleteFileA(t *TLS, lpFileName uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v, (%v:)", t, lpFileName, origin(2))
+ }
panic(todo(""))
}
@@ -3054,6 +3570,9 @@ func XDeleteFileA(t *TLS, lpFileName uintptr) int32 {
//
// );
func XFormatMessageA(t *TLS, dwFlagsAndAttributes uint32, lpSource uintptr, dwMessageId, dwLanguageId uint32, lpBuffer uintptr, nSize uint32, Arguments uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v dwFlagsAndAttributes=%v lpSource=%v dwLanguageId=%v lpBuffer=%v nSize=%v Arguments=%v, (%v:)", t, dwFlagsAndAttributes, lpSource, dwLanguageId, lpBuffer, nSize, Arguments, origin(2))
+ }
panic(todo(""))
}
@@ -3069,6 +3588,9 @@ func XFormatMessageA(t *TLS, dwFlagsAndAttributes uint32, lpSource uintptr, dwMe
//
// );
func XFormatMessageW(t *TLS, dwFlags uint32, lpSource uintptr, dwMessageId, dwLanguageId uint32, lpBuffer uintptr, nSize uint32, Arguments uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v dwFlags=%v lpSource=%v dwLanguageId=%v lpBuffer=%v nSize=%v Arguments=%v, (%v:)", t, dwFlags, lpSource, dwLanguageId, lpBuffer, nSize, Arguments, origin(2))
+ }
r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7,
uintptr(dwFlags), lpSource, uintptr(dwMessageId), uintptr(dwLanguageId),
lpBuffer, uintptr(nSize), Arguments, 0, 0)
@@ -3085,11 +3607,17 @@ func XFormatMessageW(t *TLS, dwFlags uint32, lpSource uintptr, dwMessageId, dwLa
// BOOL FreeLibrary(HMODULE hLibModule);
func XFreeLibrary(t *TLS, hLibModule uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hLibModule=%v, (%v:)", t, hLibModule, origin(2))
+ }
panic(todo(""))
}
// DWORD GetCurrentProcessId();
func XGetCurrentProcessId(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
pid := uint32(r0)
return pid
@@ -3105,6 +3633,9 @@ func XGetCurrentProcessId(t *TLS) uint32 {
//
// );
func XGetDiskFreeSpaceA(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpTotalNumberOfClusters=%v, (%v:)", t, lpTotalNumberOfClusters, origin(2))
+ }
panic(todo(""))
}
@@ -3118,6 +3649,9 @@ func XGetDiskFreeSpaceA(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerS
//
// );
func XGetDiskFreeSpaceW(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpTotalNumberOfClusters=%v, (%v:)", t, lpTotalNumberOfClusters, origin(2))
+ }
panic(todo(""))
}
@@ -3127,6 +3661,9 @@ func XGetDiskFreeSpaceW(t *TLS, lpRootPathName, lpSectorsPerCluster, lpBytesPerS
//
// );
func XGetFileAttributesA(t *TLS, lpFileName uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v, (%v:)", t, lpFileName, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetFileAttributesA.Addr(), 1, lpFileName, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -3142,6 +3679,9 @@ func XGetFileAttributesA(t *TLS, lpFileName uintptr) uint32 {
//
// );
func XGetFileAttributesExW(t *TLS, lpFileName uintptr, fInfoLevelId uint32, lpFileInformation uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v fInfoLevelId=%v lpFileInformation=%v, (%v:)", t, lpFileName, fInfoLevelId, lpFileInformation, origin(2))
+ }
r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, lpFileName, uintptr(fInfoLevelId), lpFileInformation)
if r1 == 0 {
if e1 != 0 {
@@ -3161,6 +3701,9 @@ func XGetFileAttributesExW(t *TLS, lpFileName uintptr, fInfoLevelId uint32, lpFi
//
// );
func XGetFileSize(t *TLS, hFile, lpFileSizeHigh uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileSizeHigh=%v, (%v:)", t, lpFileSizeHigh, origin(2))
+ }
r1, _, e1 := syscall.Syscall(procGetFileSize.Addr(), 2, hFile, lpFileSizeHigh, 0)
if r1 == math.MaxUint32 {
if lpFileSizeHigh == 0 {
@@ -3188,11 +3731,17 @@ func XGetFileSize(t *TLS, hFile, lpFileSizeHigh uintptr) uint32 {
//
// );
func XGetFullPathNameA(t *TLS, lpFileName uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v nBufferLength=%v lpFilePart=%v, (%v:)", t, lpFileName, nBufferLength, lpFilePart, origin(2))
+ }
panic(todo(""))
}
// FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName);
func XGetProcAddress(t *TLS, hModule, lpProcName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpProcName=%v, (%v:)", t, lpProcName, origin(2))
+ }
return 0
@@ -3211,6 +3760,9 @@ func XGetProcAddress(t *TLS, hModule, lpProcName uintptr) uintptr {
//
// );
func XRtlGetVersion(t *TLS, lpVersionInformation uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpVersionInformation=%v, (%v:)", t, lpVersionInformation, origin(2))
+ }
panic(todo(""))
}
@@ -3220,11 +3772,17 @@ func XRtlGetVersion(t *TLS, lpVersionInformation uintptr) uintptr {
//
// );
func XGetSystemInfo(t *TLS, lpSystemInfo uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpSystemInfo=%v, (%v:)", t, lpSystemInfo, origin(2))
+ }
syscall.Syscall(procGetSystemInfo.Addr(), 1, lpSystemInfo, 0, 0)
}
// void GetSystemTime(LPSYSTEMTIME lpSystemTime);
func XGetSystemTime(t *TLS, lpSystemTime uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpSystemTime=%v, (%v:)", t, lpSystemTime, origin(2))
+ }
syscall.Syscall(procGetSystemTime.Addr(), 1, lpSystemTime, 0, 0)
}
@@ -3234,6 +3792,9 @@ func XGetSystemTime(t *TLS, lpSystemTime uintptr) {
//
// );
func XGetSystemTimeAsFileTime(t *TLS, lpSystemTimeAsFileTime uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpSystemTimeAsFileTime=%v, (%v:)", t, lpSystemTimeAsFileTime, origin(2))
+ }
syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, lpSystemTimeAsFileTime, 0, 0)
}
@@ -3244,6 +3805,9 @@ func XGetSystemTimeAsFileTime(t *TLS, lpSystemTimeAsFileTime uintptr) {
//
// );
func XGetTempPathA(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v nBufferLength=%v lpBuffer=%v, (%v:)", t, nBufferLength, lpBuffer, origin(2))
+ }
panic(todo(""))
}
@@ -3254,6 +3818,9 @@ func XGetTempPathA(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
//
// );
func XGetTempPathW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v nBufferLength=%v lpBuffer=%v, (%v:)", t, nBufferLength, lpBuffer, origin(2))
+ }
rv, err := syscall.GetTempPath(nBufferLength, (*uint16)(unsafe.Pointer(lpBuffer)))
if err != nil {
t.setErrno(err)
@@ -3263,6 +3830,9 @@ func XGetTempPathW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
// DWORD GetTickCount();
func XGetTickCount(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, _ := syscall.Syscall(procGetTickCount.Addr(), 0, 0, 0, 0)
return uint32(r0)
}
@@ -3273,6 +3843,9 @@ func XGetTickCount(t *TLS) uint32 {
//
// );
func XGetVersionExA(t *TLS, lpVersionInformation uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpVersionInformation=%v, (%v:)", t, lpVersionInformation, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetVersionExA.Addr(), 1, lpVersionInformation, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -3288,6 +3861,9 @@ func XGetVersionExA(t *TLS, lpVersionInformation uintptr) int32 {
//
// );
func XHeapCreate(t *TLS, flOptions uint32, dwInitialSize, dwMaximumSize types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v flOptions=%v dwMaximumSize=%v, (%v:)", t, flOptions, dwMaximumSize, origin(2))
+ }
panic(todo(""))
}
@@ -3297,6 +3873,9 @@ func XHeapCreate(t *TLS, flOptions uint32, dwInitialSize, dwMaximumSize types.Si
//
// );
func XHeapDestroy(t *TLS, hHeap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v, (%v:)", t, hHeap, origin(2))
+ }
panic(todo(""))
}
@@ -3309,6 +3888,9 @@ func XHeapDestroy(t *TLS, hHeap uintptr) int32 {
//
// );
func XHeapReAlloc(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr, dwBytes types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v lpMem=%v dwBytes=%v, (%v:)", t, hHeap, dwFlags, lpMem, dwBytes, origin(2))
+ }
panic(todo(""))
}
@@ -3320,6 +3902,9 @@ func XHeapReAlloc(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr, dwBytes
//
// );
func XHeapSize(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v lpMem=%v, (%v:)", t, hHeap, dwFlags, lpMem, origin(2))
+ }
panic(todo(""))
}
@@ -3331,6 +3916,9 @@ func XHeapSize(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) types.Size_
//
// );
func XHeapValidate(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v lpMem=%v, (%v:)", t, hHeap, dwFlags, lpMem, origin(2))
+ }
panic(todo(""))
}
@@ -3341,11 +3929,17 @@ func XHeapValidate(t *TLS, hHeap uintptr, dwFlags uint32, lpMem uintptr) int32 {
//
// );
func XHeapCompact(t *TLS, hHeap uintptr, dwFlags uint32) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v hHeap=%v dwFlags=%v, (%v:)", t, hHeap, dwFlags, origin(2))
+ }
panic(todo(""))
}
// HMODULE LoadLibraryA(LPCSTR lpLibFileName);
func XLoadLibraryA(t *TLS, lpLibFileName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpLibFileName=%v, (%v:)", t, lpLibFileName, origin(2))
+ }
panic(todo(""))
}
@@ -3355,6 +3949,9 @@ func XLoadLibraryA(t *TLS, lpLibFileName uintptr) uintptr {
//
// );
func XLoadLibraryW(t *TLS, lpLibFileName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpLibFileName=%v, (%v:)", t, lpLibFileName, origin(2))
+ }
panic(todo(""))
}
@@ -3364,6 +3961,9 @@ func XLoadLibraryW(t *TLS, lpLibFileName uintptr) uintptr {
//
// );
func XLocalFree(t *TLS, hMem uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v hMem=%v, (%v:)", t, hMem, origin(2))
+ }
h, err := syscall.LocalFree(syscall.Handle(hMem))
if h != 0 {
if err != nil {
@@ -3386,6 +3986,9 @@ func XLocalFree(t *TLS, hMem uintptr) uintptr {
//
// );
func XLockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v nNumberOfBytesToLockHigh=%v, (%v:)", t, hFile, nNumberOfBytesToLockHigh, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procLockFile.Addr(), 5,
hFile, uintptr(dwFileOffsetLow), uintptr(dwFileOffsetHigh), uintptr(nNumberOfBytesToLockLow), uintptr(nNumberOfBytesToLockHigh), 0)
@@ -3412,6 +4015,9 @@ func XLockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumber
//
// );
func XLockFileEx(t *TLS, hFile uintptr, dwFlags, dwReserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh uint32, lpOverlapped uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v nNumberOfBytesToLockHigh=%v lpOverlapped=%v, (%v:)", t, hFile, nNumberOfBytesToLockHigh, lpOverlapped, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6,
hFile, uintptr(dwFlags), uintptr(dwReserved), uintptr(nNumberOfBytesToLockLow), uintptr(nNumberOfBytesToLockHigh), lpOverlapped)
if r1 == 0 {
@@ -3435,6 +4041,9 @@ func XLockFileEx(t *TLS, hFile uintptr, dwFlags, dwReserved, nNumberOfBytesToLoc
//
// );
func XMapViewOfFile(t *TLS, hFileMappingObject uintptr, dwDesiredAccess, dwFileOffsetHigh, dwFileOffsetLow uint32, dwNumberOfBytesToMap types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v hFileMappingObject=%v dwFileOffsetLow=%v dwNumberOfBytesToMap=%v, (%v:)", t, hFileMappingObject, dwFileOffsetLow, dwNumberOfBytesToMap, origin(2))
+ }
h, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, hFileMappingObject, uintptr(dwDesiredAccess),
uintptr(dwFileOffsetHigh), uintptr(dwFileOffsetLow), uintptr(dwNumberOfBytesToMap), 0)
if h == 0 {
@@ -3453,6 +4062,9 @@ func XMapViewOfFile(t *TLS, hFileMappingObject uintptr, dwDesiredAccess, dwFileO
//
// );
func XQueryPerformanceCounter(t *TLS, lpPerformanceCount uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpPerformanceCount=%v, (%v:)", t, lpPerformanceCount, origin(2))
+ }
r0, _, _ := syscall.Syscall(procQueryPerformanceCounter.Addr(), 1, lpPerformanceCount, 0, 0)
return int32(r0)
}
@@ -3463,11 +4075,17 @@ func XQueryPerformanceCounter(t *TLS, lpPerformanceCount uintptr) int32 {
//
// );
func XSleep(t *TLS, dwMilliseconds uint32) {
+ if __ccgo_strace {
+ trc("t=%v dwMilliseconds=%v, (%v:)", t, dwMilliseconds, origin(2))
+ }
gotime.Sleep(gotime.Duration(dwMilliseconds) * gotime.Millisecond)
}
// BOOL SystemTimeToFileTime(const SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime);
func XSystemTimeToFileTime(t *TLS, lpSystemTime, lpFileTime uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileTime=%v, (%v:)", t, lpFileTime, origin(2))
+ }
r0, _, _ := syscall.Syscall(procSystemTimeToFileTime.Addr(), 2, lpSystemTime, lpFileTime, 0)
return int32(r0)
}
@@ -3482,6 +4100,9 @@ func XSystemTimeToFileTime(t *TLS, lpSystemTime, lpFileTime uintptr) int32 {
//
// );
func XUnlockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v nNumberOfBytesToUnlockHigh=%v, (%v:)", t, hFile, nNumberOfBytesToUnlockHigh, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procUnlockFile.Addr(), 5,
hFile, uintptr(dwFileOffsetLow), uintptr(dwFileOffsetHigh), uintptr(nNumberOfBytesToUnlockLow), uintptr(nNumberOfBytesToUnlockHigh), 0)
if r1 == 0 {
@@ -3505,6 +4126,9 @@ func XUnlockFile(t *TLS, hFile uintptr, dwFileOffsetLow, dwFileOffsetHigh, nNumb
//
// );
func XUnlockFileEx(t *TLS, hFile uintptr, dwReserved, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh uint32, lpOverlapped uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v nNumberOfBytesToUnlockHigh=%v lpOverlapped=%v, (%v:)", t, hFile, nNumberOfBytesToUnlockHigh, lpOverlapped, origin(2))
+ }
r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5,
hFile, uintptr(dwReserved), uintptr(nNumberOfBytesToUnlockLow), uintptr(nNumberOfBytesToUnlockHigh), lpOverlapped, 0)
if r1 == 0 {
@@ -3524,6 +4148,9 @@ func XUnlockFileEx(t *TLS, hFile uintptr, dwReserved, nNumberOfBytesToUnlockLow,
//
// );
func XUnmapViewOfFile(t *TLS, lpBaseAddress uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBaseAddress=%v, (%v:)", t, lpBaseAddress, origin(2))
+ }
err := syscall.UnmapViewOfFile(lpBaseAddress)
if err != nil {
t.setErrno(err)
@@ -3545,6 +4172,9 @@ func XUnmapViewOfFile(t *TLS, lpBaseAddress uintptr) int32 {
//
// );
func XWideCharToMultiByte(t *TLS, CodePage uint32, dwFlags uint32, lpWideCharStr uintptr, cchWideChar int32, lpMultiByteStr uintptr, cbMultiByte int32, lpDefaultChar, lpUsedDefaultChar uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v CodePage=%v dwFlags=%v lpWideCharStr=%v cchWideChar=%v lpMultiByteStr=%v cbMultiByte=%v lpUsedDefaultChar=%v, (%v:)", t, CodePage, dwFlags, lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, lpUsedDefaultChar, origin(2))
+ }
r1, _, _ := syscall.Syscall9(procWideCharToMultiByte.Addr(), 8,
uintptr(CodePage), uintptr(dwFlags), lpWideCharStr,
uintptr(cchWideChar), lpMultiByteStr, uintptr(cbMultiByte),
@@ -3558,6 +4188,9 @@ func XWideCharToMultiByte(t *TLS, CodePage uint32, dwFlags uint32, lpWideCharStr
//
// )
func XOutputDebugStringA(t *TLS, lpOutputString uintptr) {
+ if __ccgo_strace {
+ trc("t=%v lpOutputString=%v, (%v:)", t, lpOutputString, origin(2))
+ }
panic(todo(""))
}
@@ -3568,6 +4201,9 @@ func XOutputDebugStringA(t *TLS, lpOutputString uintptr) {
//
// );
func XFlushViewOfFile(t *TLS, lpBaseAddress uintptr, dwNumberOfBytesToFlush types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBaseAddress=%v dwNumberOfBytesToFlush=%v, (%v:)", t, lpBaseAddress, dwNumberOfBytesToFlush, origin(2))
+ }
err := syscall.FlushViewOfFile(lpBaseAddress, uintptr(dwNumberOfBytesToFlush))
if err != nil {
t.setErrno(err)
@@ -3605,6 +4241,9 @@ func WindowsTickToUnixSeconds(windowsTicks int64) int64 {
// int _stat64(const char *path, struct __stat64 *buffer);
func X_stat64(t *TLS, path, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v, (%v:)", t, buffer, origin(2))
+ }
var fa syscall.Win32FileAttributeData
r1, _, e1 := syscall.Syscall(procGetFileAttributesExA.Addr(), 3, path, syscall.GetFileExInfoStandard, (uintptr)(unsafe.Pointer(&fa)))
@@ -3658,6 +4297,9 @@ func WindowsAttrbiutesToStat(fa uint32) uint16 {
//
// );
func X_chsize(t *TLS, fd int32, size long) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v size=%v, (%v:)", t, fd, size, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -3676,6 +4318,9 @@ func X_chsize(t *TLS, fd int32, size long) int32 {
// int _snprintf(char *str, size_t size, const char *format, ...);
func X_snprintf(t *TLS, str uintptr, size types.Size_t, format, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v args=%v, (%v:)", t, str, size, args, origin(2))
+ }
return Xsnprintf(t, str, size, format, args)
}
@@ -3711,6 +4356,9 @@ func win32FindDataToFileInfo(t *TLS, fdata *stat.X_finddata64i32_t, wfd *syscall
//
// );
func X_findfirst64i32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t {
+ if __ccgo_strace {
+ trc("t=%v fileinfo=%v, (%v:)", t, fileinfo, origin(2))
+ }
// Note: this is the 'narrow' character findfirst -- expects output
// as mbcs -- conversion below -- via ToFileInfo
@@ -3746,6 +4394,9 @@ func X_findfirst64i32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t {
//
// );
func X_findnext64i32(t *TLS, handle types.Intptr_t, fileinfo uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v fileinfo=%v, (%v:)", t, handle, fileinfo, origin(2))
+ }
var fdata = (*stat.X_finddata64i32_t)(unsafe.Pointer(fileinfo))
var wfd syscall.Win32finddata
@@ -3769,6 +4420,9 @@ func X_findnext64i32(t *TLS, handle types.Intptr_t, fileinfo uintptr) int32 {
//
// );
func X_findclose(t *TLS, handle types.Intptr_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v, (%v:)", t, handle, origin(2))
+ }
err := syscall.FindClose(syscall.Handle(handle))
if err != nil {
@@ -3786,6 +4440,9 @@ func X_findclose(t *TLS, handle types.Intptr_t) int32 {
//
// );
func XGetEnvironmentVariableA(t *TLS, lpName, lpBuffer uintptr, nSize uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nSize=%v, (%v:)", t, lpBuffer, nSize, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableA.Addr(), 3, lpName, lpBuffer, uintptr(nSize))
n := uint32(r0)
if n == 0 {
@@ -3805,6 +4462,9 @@ func XGetEnvironmentVariableA(t *TLS, lpName, lpBuffer uintptr, nSize uint32) ui
//
// );
func X_fstat64(t *TLS, fd int32, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buffer=%v, (%v:)", t, fd, buffer, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -3842,6 +4502,9 @@ func X_fstat64(t *TLS, fd int32, buffer uintptr) int32 {
//
// );
func XCreateEventA(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialState int32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpEventAttributes=%v bInitialState=%v lpName=%v, (%v:)", t, lpEventAttributes, bInitialState, lpName, origin(2))
+ }
r0, _, err := syscall.Syscall6(procCreateEventA.Addr(), 4, lpEventAttributes, uintptr(bManualReset),
uintptr(bInitialState), lpName, 0, 0)
if r0 == 0 {
@@ -3856,6 +4519,9 @@ func XCreateEventA(t *TLS, lpEventAttributes uintptr, bManualReset, bInitialStat
//
// );
func XCancelSynchronousIo(t *TLS, hThread uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hThread=%v, (%v:)", t, hThread, origin(2))
+ }
panic(todo(""))
}
@@ -3868,6 +4534,9 @@ func X_endthreadex(t *TLS, _ ...interface{}) {
// and gets that via the go callback. This is safe because the thread is calling into go
// not a cdecl function which would expect the stack setup of cdecl.
func X_beginthread(t *TLS, procAddr uintptr, stack_sz uint32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v procAddr=%v stack_sz=%v args=%v, (%v:)", t, procAddr, stack_sz, args, origin(2))
+ }
f := (*struct{ f func(*TLS, uintptr) uint32 })(unsafe.Pointer(&struct{ uintptr }{procAddr})).f
var tAdp = ThreadAdapter{threadFunc: f, tls: NewTLS(), param: args}
tAdp.token = addObject(&tAdp)
@@ -3905,6 +4574,9 @@ func X_beginthreadex(t *TLS, _ uintptr, stack_sz uint32, procAddr uintptr, args
// DWORD GetCurrentThreadId();
func XGetCurrentThreadId(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
return uint32(r0)
//return uint32(t.ID)
@@ -3917,6 +4589,9 @@ func XGetCurrentThreadId(t *TLS) uint32 {
//
// );
func XGetExitCodeThread(t *TLS, hThread, lpExitCode uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpExitCode=%v, (%v:)", t, lpExitCode, origin(2))
+ }
r0, _, _ := syscall.Syscall(procGetExitCodeThread.Addr(), 2, hThread, lpExitCode, 0)
return int32(r0)
}
@@ -3929,6 +4604,9 @@ func XGetExitCodeThread(t *TLS, hThread, lpExitCode uintptr) int32 {
//
// );
func XWaitForSingleObjectEx(t *TLS, hHandle uintptr, dwMilliseconds uint32, bAlertable int32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v hHandle=%v dwMilliseconds=%v bAlertable=%v, (%v:)", t, hHandle, dwMilliseconds, bAlertable, origin(2))
+ }
rv, _, _ := syscall.Syscall(procWaitForSingleObjectEx.Addr(), 3, hHandle, uintptr(dwMilliseconds), uintptr(bAlertable))
return uint32(rv)
}
@@ -3943,6 +4621,9 @@ func XWaitForSingleObjectEx(t *TLS, hHandle uintptr, dwMilliseconds uint32, bAle
//
// );
func XMsgWaitForMultipleObjectsEx(t *TLS, nCount uint32, pHandles uintptr, dwMilliseconds, dwWakeMask, dwFlags uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v nCount=%v pHandles=%v dwFlags=%v, (%v:)", t, nCount, pHandles, dwFlags, origin(2))
+ }
r0, _, err := syscall.Syscall6(procMsgWaitForMultipleObjectsEx.Addr(), 5,
uintptr(nCount),
pHandles,
@@ -3969,6 +4650,9 @@ func XMessageBoxW(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetModuleFileNameW(t *TLS, hModule, lpFileName uintptr, nSize uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v nSize=%v, (%v:)", t, lpFileName, nSize, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, hModule, lpFileName, uintptr(nSize))
if r0 == 0 {
t.setErrno(err)
@@ -3984,6 +4668,9 @@ func XGetModuleFileNameW(t *TLS, hModule, lpFileName uintptr, nSize uint32) uint
//
// );
func XNetGetDCName(t *TLS, ServerName, DomainName, Buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v Buffer=%v, (%v:)", t, Buffer, origin(2))
+ }
r0, _, err := syscall.Syscall(procNetGetDCName.Addr(), 3, ServerName, DomainName, Buffer)
if err != 0 {
t.setErrno(err)
@@ -4000,6 +4687,9 @@ func XNetGetDCName(t *TLS, ServerName, DomainName, Buffer uintptr) int32 {
//
// );
func XNetUserGetInfo(t *TLS, servername, username uintptr, level uint32, bufptr uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v username=%v level=%v bufptr=%v, (%v:)", t, username, level, bufptr, origin(2))
+ }
r0, _, err := syscall.Syscall6(procNetUserGetInfo.Addr(), 4,
servername,
username,
@@ -4025,6 +4715,9 @@ func XlstrlenW(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetProfilesDirectoryW(t *TLS, lpProfileDir, lpcchSize uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpcchSize=%v, (%v:)", t, lpcchSize, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetProfilesDirectoryW.Addr(), 2, lpProfileDir, lpcchSize, 0)
if err != 0 {
t.setErrno(err)
@@ -4047,6 +4740,9 @@ func XNetApiBufferFree(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetPrivateProfileStringA(t *TLS, lpAppName, lpKeyName, lpDefault, lpReturnedString uintptr, nSize uint32, lpFileName uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpReturnedString=%v nSize=%v lpFileName=%v, (%v:)", t, lpReturnedString, nSize, lpFileName, origin(2))
+ }
r0, _, err := syscall.Syscall6(procGetPrivateProfileStringA.Addr(), 4,
lpAppName,
lpKeyName,
@@ -4075,6 +4771,9 @@ func XGetWindowsDirectoryA(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetFileSecurityW(t *TLS, lpFileName uintptr, RequestedInformation uint32, pSecurityDescriptor uintptr, nLength uint32, lpnLengthNeeded uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v RequestedInformation=%v pSecurityDescriptor=%v nLength=%v lpnLengthNeeded=%v, (%v:)", t, lpFileName, RequestedInformation, pSecurityDescriptor, nLength, lpnLengthNeeded, origin(2))
+ }
r0, _, err := syscall.Syscall6(procGetFileSecurityW.Addr(), 5, lpFileName, uintptr(RequestedInformation), pSecurityDescriptor, uintptr(nLength), lpnLengthNeeded, 0)
if err != 0 {
t.setErrno(err)
@@ -4090,6 +4789,9 @@ func XGetFileSecurityW(t *TLS, lpFileName uintptr, RequestedInformation uint32,
//
// );
func XGetSecurityDescriptorOwner(t *TLS, pSecurityDescriptor, pOwner, lpbOwnerDefaulted uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpbOwnerDefaulted=%v, (%v:)", t, lpbOwnerDefaulted, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, pSecurityDescriptor, pOwner, lpbOwnerDefaulted)
if err != 0 {
t.setErrno(err)
@@ -4104,6 +4806,9 @@ func XGetSecurityDescriptorOwner(t *TLS, pSecurityDescriptor, pOwner, lpbOwnerDe
//
// );
func XGetSidIdentifierAuthority(t *TLS, pSid uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v pSid=%v, (%v:)", t, pSid, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, pSid, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -4117,6 +4822,9 @@ func XGetSidIdentifierAuthority(t *TLS, pSid uintptr) uintptr {
//
// );
func XImpersonateSelf(t *TLS, ImpersonationLevel int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v ImpersonationLevel=%v, (%v:)", t, ImpersonationLevel, origin(2))
+ }
r0, _, err := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(ImpersonationLevel), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -4133,6 +4841,9 @@ func XImpersonateSelf(t *TLS, ImpersonationLevel int32) int32 {
//
// );
func XOpenThreadToken(t *TLS, ThreadHandle uintptr, DesiredAccess uint32, OpenAsSelf int32, TokenHandle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ThreadHandle=%v DesiredAccess=%v OpenAsSelf=%v TokenHandle=%v, (%v:)", t, ThreadHandle, DesiredAccess, OpenAsSelf, TokenHandle, origin(2))
+ }
r0, _, err := syscall.Syscall6(procOpenThreadToken.Addr(), 4, ThreadHandle, uintptr(DesiredAccess), uintptr(OpenAsSelf), TokenHandle, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -4142,6 +4853,9 @@ func XOpenThreadToken(t *TLS, ThreadHandle uintptr, DesiredAccess uint32, OpenAs
// HANDLE GetCurrentThread();
func XGetCurrentThread(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -4151,6 +4865,9 @@ func XGetCurrentThread(t *TLS) uintptr {
// BOOL RevertToSelf();
func XRevertToSelf(t *TLS) int32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, err := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
if err != 0 {
t.setErrno(err)
@@ -4171,6 +4888,9 @@ func XRevertToSelf(t *TLS) int32 {
//
// );
func XAccessCheck(t *TLS, pSecurityDescriptor, ClientToken uintptr, DesiredAccess uint32, GenericMapping, PrivilegeSet, PrivilegeSetLength, GrantedAccess, AccessStatus uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ClientToken=%v DesiredAccess=%v AccessStatus=%v, (%v:)", t, ClientToken, DesiredAccess, AccessStatus, origin(2))
+ }
r0, _, err := syscall.Syscall9(procAccessCheck.Addr(), 8,
pSecurityDescriptor,
ClientToken,
@@ -4195,6 +4915,9 @@ func XAccessCheck(t *TLS, pSecurityDescriptor, ClientToken uintptr, DesiredAcces
//
// );
func Xwcsicmp(t *TLS, string1, string2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v, (%v:)", t, string2, origin(2))
+ }
var s1 = strings.ToLower(goWideString(string1))
var s2 = strings.ToLower(goWideString(string2))
return int32(strings.Compare(s1, s2))
@@ -4206,6 +4929,9 @@ func Xwcsicmp(t *TLS, string1, string2 uintptr) int32 {
//
// );
func XSetCurrentDirectoryW(t *TLS, lpPathName uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpPathName=%v, (%v:)", t, lpPathName, origin(2))
+ }
err := syscall.SetCurrentDirectory((*uint16)(unsafe.Pointer(lpPathName)))
if err != nil {
t.setErrno(err)
@@ -4221,6 +4947,9 @@ func XSetCurrentDirectoryW(t *TLS, lpPathName uintptr) int32 {
//
// );
func XGetCurrentDirectoryW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v nBufferLength=%v lpBuffer=%v, (%v:)", t, nBufferLength, lpBuffer, origin(2))
+ }
n, err := syscall.GetCurrentDirectory(nBufferLength, (*uint16)(unsafe.Pointer(lpBuffer)))
if err != nil {
t.setErrno(err)
@@ -4235,6 +4964,9 @@ func XGetCurrentDirectoryW(t *TLS, nBufferLength uint32, lpBuffer uintptr) uint3
//
// );
func XGetFileInformationByHandle(t *TLS, hFile, lpFileInformation uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileInformation=%v, (%v:)", t, lpFileInformation, origin(2))
+ }
r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, hFile, lpFileInformation, 0)
if r1 == 0 {
if e1 != 0 {
@@ -4259,6 +4991,9 @@ func XGetFileInformationByHandle(t *TLS, hFile, lpFileInformation uintptr) int32
//
// );
func XGetVolumeInformationW(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr, nVolumeNameSize uint32, lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, lpFileSystemNameBuffer uintptr, nFileSystemNameSize uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpVolumeNameBuffer=%v nVolumeNameSize=%v lpFileSystemNameBuffer=%v nFileSystemNameSize=%v, (%v:)", t, lpVolumeNameBuffer, nVolumeNameSize, lpFileSystemNameBuffer, nFileSystemNameSize, origin(2))
+ }
r0, _, err := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8,
lpRootPathName,
lpVolumeNameBuffer,
@@ -4283,6 +5018,9 @@ func XGetVolumeInformationW(t *TLS, lpRootPathName, lpVolumeNameBuffer uintptr,
//
// );
func Xwcschr(t *TLS, str uintptr, c wchar_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v str=%v c=%v, (%v:)", t, str, c, origin(2))
+ }
var source = str
for {
var buf = *(*uint16)(unsafe.Pointer(source))
@@ -4307,6 +5045,9 @@ func Xwcschr(t *TLS, str uintptr, c wchar_t) uintptr {
//
// );
func XSetFileTime(t *TLS, hFile uintptr, lpCreationTime, lpLastAccessTime, lpLastWriteTime uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v lpLastWriteTime=%v, (%v:)", t, hFile, lpLastWriteTime, origin(2))
+ }
panic(todo(""))
}
@@ -4323,6 +5064,9 @@ func XSetFileTime(t *TLS, hFile uintptr, lpCreationTime, lpLastAccessTime, lpLas
//
// );
func XGetNamedSecurityInfoW(t *TLS, pObjectName uintptr, ObjectType, SecurityInfo uint32, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v pObjectName=%v SecurityInfo=%v ppSecurityDescriptor=%v, (%v:)", t, pObjectName, SecurityInfo, ppSecurityDescriptor, origin(2))
+ }
panic(todo(""))
}
@@ -4334,6 +5078,9 @@ func XGetNamedSecurityInfoW(t *TLS, pObjectName uintptr, ObjectType, SecurityInf
//
// );
func XOpenProcessToken(t *TLS, ProcessHandle uintptr, DesiredAccess uint32, TokenHandle uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ProcessHandle=%v DesiredAccess=%v TokenHandle=%v, (%v:)", t, ProcessHandle, DesiredAccess, TokenHandle, origin(2))
+ }
panic(todo(""))
}
@@ -4347,6 +5094,9 @@ func XOpenProcessToken(t *TLS, ProcessHandle uintptr, DesiredAccess uint32, Toke
//
// );
func XGetTokenInformation(t *TLS, TokenHandle uintptr, TokenInformationClass uint32, TokenInformation uintptr, TokenInformationLength uint32, ReturnLength uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v TokenHandle=%v TokenInformationClass=%v TokenInformation=%v TokenInformationLength=%v ReturnLength=%v, (%v:)", t, TokenHandle, TokenInformationClass, TokenInformation, TokenInformationLength, ReturnLength, origin(2))
+ }
panic(todo(""))
}
@@ -4357,6 +5107,9 @@ func XGetTokenInformation(t *TLS, TokenHandle uintptr, TokenInformationClass uin
//
// );
func XEqualSid(t *TLS, pSid1, pSid2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pSid2=%v, (%v:)", t, pSid2, origin(2))
+ }
panic(todo(""))
}
@@ -4367,6 +5120,9 @@ func XEqualSid(t *TLS, pSid1, pSid2 uintptr) int32 {
//
// );
func XWSAStartup(t *TLS, wVersionRequired uint16, lpWSAData uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v wVersionRequired=%v lpWSAData=%v, (%v:)", t, wVersionRequired, lpWSAData, origin(2))
+ }
r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(wVersionRequired), lpWSAData, 0)
if r0 != 0 {
t.setErrno(r0)
@@ -4376,6 +5132,9 @@ func XWSAStartup(t *TLS, wVersionRequired uint16, lpWSAData uintptr) int32 {
// HMODULE GetModuleHandleA(LPCSTR lpModuleName);
func XGetModuleHandleA(t *TLS, lpModuleName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpModuleName=%v, (%v:)", t, lpModuleName, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetModuleHandleA.Addr(), 1, lpModuleName, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4389,6 +5148,9 @@ func XGetModuleHandleA(t *TLS, lpModuleName uintptr) uintptr {
//
// );
func XGetModuleHandleW(t *TLS, lpModuleName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v lpModuleName=%v, (%v:)", t, lpModuleName, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetModuleHandleW.Addr(), 1, lpModuleName, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4404,6 +5166,9 @@ func XGetModuleHandleW(t *TLS, lpModuleName uintptr) uintptr {
//
// );
func XGetEnvironmentVariableW(t *TLS, lpName, lpBuffer uintptr, nSize uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nSize=%v, (%v:)", t, lpBuffer, nSize, origin(2))
+ }
r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, lpName, lpBuffer, uintptr(nSize))
n := uint32(r0)
if n == 0 {
@@ -4423,6 +5188,9 @@ func XGetEnvironmentVariableW(t *TLS, lpName, lpBuffer uintptr, nSize uint32) ui
//
// );
func XlstrcmpiA(t *TLS, lpString1, lpString2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpString2=%v, (%v:)", t, lpString2, origin(2))
+ }
var s1 = strings.ToLower(GoString(lpString1))
var s2 = strings.ToLower(GoString(lpString2))
return int32(strings.Compare(s1, s2))
@@ -4434,6 +5202,9 @@ func XGetModuleFileNameA(t *TLS, _ ...interface{}) int32 {
// UINT GetACP();
func XGetACP(t *TLS) uint32 {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
return uint32(r0)
}
@@ -4445,6 +5216,9 @@ func XGetACP(t *TLS) uint32 {
//
// );
func XGetUserNameW(t *TLS, lpBuffer, pcbBuffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pcbBuffer=%v, (%v:)", t, pcbBuffer, origin(2))
+ }
u, err := user.Current()
if err != nil {
panic(todo(""))
@@ -4473,6 +5247,9 @@ func XGetUserNameW(t *TLS, lpBuffer, pcbBuffer uintptr) int32 {
//
// );
func XLoadLibraryExW(t *TLS, lpLibFileName, hFile uintptr, dwFlags uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v hFile=%v dwFlags=%v, (%v:)", t, hFile, dwFlags, origin(2))
+ }
return 0 // If the function fails, the return value is NULL.
}
@@ -4483,6 +5260,9 @@ func XLoadLibraryExW(t *TLS, lpLibFileName, hFile uintptr, dwFlags uint32) uintp
//
// );
func Xwcscpy(t *TLS, strDestination, strSource uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v strSource=%v, (%v:)", t, strSource, origin(2))
+ }
if strSource == 0 {
return 0
}
@@ -4509,6 +5289,9 @@ func XwsprintfW(t *TLS, _ ...interface{}) int32 {
//
// );
func XRegisterClassW(t *TLS, lpWndClass uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpWndClass=%v, (%v:)", t, lpWndClass, origin(2))
+ }
r0, _, err := syscall.Syscall(procRegisterClassW.Addr(), 1, lpWndClass, 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4531,6 +5314,9 @@ func XDestroyWindow(t *TLS, _ ...interface{}) int32 {
//
// );
func XUnregisterClassW(t *TLS, lpClassName, hInstance uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v hInstance=%v, (%v:)", t, hInstance, origin(2))
+ }
r0, _, err := syscall.Syscall(procUnregisterClassW.Addr(), 2, lpClassName, hInstance, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4563,6 +5349,9 @@ func XSetTimer(t *TLS, _ ...interface{}) int32 {
//
// );
func XCreateWindowExW(t *TLS, dwExStyle uint32, lpClassName, lpWindowName uintptr, dwStyle uint32, x, y, nWidth, nHeight int32, hWndParent, hMenu, hInstance, lpParam uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dwExStyle=%v lpWindowName=%v dwStyle=%v nHeight=%v lpParam=%v, (%v:)", t, dwExStyle, lpWindowName, dwStyle, nHeight, lpParam, origin(2))
+ }
r0, _, err := syscall.Syscall12(procCreateWindowExW.Addr(), 12,
uintptr(dwExStyle),
lpClassName,
@@ -4593,6 +5382,9 @@ func XCreateWindowExW(t *TLS, dwExStyle uint32, lpClassName, lpWindowName uintpt
//
// );
func XPeekMessageW(t *TLS, lpMsg, hWnd uintptr, wMsgFilterMin, wMsgFilterMax, wRemoveMsg uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hWnd=%v wRemoveMsg=%v, (%v:)", t, hWnd, wRemoveMsg, origin(2))
+ }
r0, _, err := syscall.Syscall6(procPeekMessageW.Addr(), 5,
lpMsg,
hWnd,
@@ -4630,6 +5422,9 @@ func XDispatchMessageW(t *TLS, _ ...interface{}) int32 {
//
// );
func XSleepEx(t *TLS, dwMilliseconds uint32, bAlertable int32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v dwMilliseconds=%v bAlertable=%v, (%v:)", t, dwMilliseconds, bAlertable, origin(2))
+ }
r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(dwMilliseconds), uintptr(bAlertable), 0)
return uint32(r0)
}
@@ -4643,6 +5438,9 @@ func XSleepEx(t *TLS, dwMilliseconds uint32, bAlertable int32) uint32 {
//
// );
func XCreatePipe(t *TLS, hReadPipe, hWritePipe, lpPipeAttributes uintptr, nSize uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpPipeAttributes=%v nSize=%v, (%v:)", t, lpPipeAttributes, nSize, origin(2))
+ }
r0, _, err := syscall.Syscall6(procCreatePipe.Addr(), 4, hReadPipe, hWritePipe, lpPipeAttributes, uintptr(nSize), 0, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4687,6 +5485,9 @@ func XCreateProcessW(t *TLS, lpApplicationName, lpCommandLine, lpProcessAttribut
//
// );
func XWaitForInputIdle(t *TLS, hProcess uintptr, dwMilliseconds uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hProcess=%v dwMilliseconds=%v, (%v:)", t, hProcess, dwMilliseconds, origin(2))
+ }
r0, _, _ := syscall.Syscall(procWaitForInputIdle.Addr(), 2, hProcess, uintptr(dwMilliseconds), 0)
return int32(r0)
}
@@ -4702,6 +5503,9 @@ func XWaitForInputIdle(t *TLS, hProcess uintptr, dwMilliseconds uint32) int32 {
//
// );
func XSearchPathW(t *TLS, lpPath, lpFileName, lpExtension uintptr, nBufferLength uint32, lpBuffer, lpFilePart uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpExtension=%v nBufferLength=%v lpFilePart=%v, (%v:)", t, lpExtension, nBufferLength, lpFilePart, origin(2))
+ }
r0, _, err := syscall.Syscall6(procSearchPathW.Addr(), 6, lpPath, lpFileName, lpExtension, uintptr(nBufferLength), lpBuffer, lpFilePart)
if r0 == 0 {
t.setErrno(err)
@@ -4720,6 +5524,9 @@ func XGetShortPathNameW(t *TLS, _ ...interface{}) int32 {
//
// );
func XGetExitCodeProcess(t *TLS, hProcess, lpExitCode uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpExitCode=%v, (%v:)", t, lpExitCode, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, hProcess, lpExitCode, 0)
if r0 == 0 {
t.setErrno(err)
@@ -4738,6 +5545,9 @@ func XGetExitCodeProcess(t *TLS, hProcess, lpExitCode uintptr) int32 {
//
// );
func XPeekNamedPipe(t *TLS, hNamedPipe, lpBuffer uintptr, nBufferSize uint32, lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpBuffer=%v nBufferSize=%v lpBytesLeftThisMessage=%v, (%v:)", t, lpBuffer, nBufferSize, lpBytesLeftThisMessage, origin(2))
+ }
r0, _, err := syscall.Syscall6(procPeekNamedPipe.Addr(), 6, hNamedPipe, lpBuffer, uintptr(nBufferSize), lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage)
if r0 == 0 {
t.setErrno(err)
@@ -4752,6 +5562,9 @@ func XPeekNamedPipe(t *TLS, hNamedPipe, lpBuffer uintptr, nBufferSize uint32, lp
//
// );
func X_InterlockedExchange(t *TLS, Target uintptr, Value long) long {
+ if __ccgo_strace {
+ trc("t=%v Target=%v Value=%v, (%v:)", t, Target, Value, origin(2))
+ }
old := atomic.SwapInt32((*int32)(unsafe.Pointer(Target)), Value)
return old
}
@@ -4763,6 +5576,9 @@ func X_InterlockedExchange(t *TLS, Target uintptr, Value long) long {
//
// );
func XTerminateThread(t *TLS, hThread uintptr, dwExitCode uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v hThread=%v dwExitCode=%v, (%v:)", t, hThread, dwExitCode, origin(2))
+ }
r0, _, err := syscall.Syscall(procTerminateThread.Addr(), 2, hThread, uintptr(dwExitCode), 0)
if err != 0 {
t.setErrno(err)
@@ -4777,6 +5593,9 @@ func XTerminateThread(t *TLS, hThread uintptr, dwExitCode uint32) int32 {
//
// );
func XGetComputerNameW(t *TLS, lpBuffer, nSize uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nSize=%v, (%v:)", t, nSize, origin(2))
+ }
panic(todo(""))
}
@@ -4850,6 +5669,9 @@ func X_controlfp(t *TLS, _ ...interface{}) uint32 {
//
// );
func XQueryPerformanceFrequency(t *TLS, lpFrequency uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFrequency=%v, (%v:)", t, lpFrequency, origin(2))
+ }
r1, _, err := syscall.Syscall(procQueryPerformanceFrequency.Addr(), 1, lpFrequency, 0, 0)
if r1 == 0 {
@@ -4871,6 +5693,9 @@ func inDST(t gotime.Time) bool {
// void _ftime( struct _timeb *timeptr );
func X_ftime(t *TLS, timeptr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v timeptr=%v, (%v:)", t, timeptr, origin(2))
+ }
var tm = gotime.Now()
var tPtr = (*time.X__timeb64)(unsafe.Pointer(timeptr))
tPtr.Ftime = tm.Unix()
@@ -4882,10 +5707,6 @@ func X_ftime(t *TLS, timeptr uintptr) {
tPtr.Ftimezone = int16(offset)
}
-func Xgmtime(t *TLS, _ ...interface{}) uintptr {
- panic(todo(""))
-}
-
func XDdeInitializeW(t *TLS, _ ...interface{}) uint32 {
panic(todo(""))
}
@@ -4913,6 +5734,9 @@ func XDdeQueryStringW(t *TLS, _ ...interface{}) int32 {
//
// );
func X_wcsicmp(t *TLS, string1, string2 uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v string2=%v, (%v:)", t, string2, origin(2))
+ }
return Xwcsicmp(t, string1, string2)
}
@@ -4981,6 +5805,9 @@ func XDdeGetLastError(t *TLS, _ ...interface{}) uint32 {
//
// );
func XDdeClientTransaction(t *TLS, pData uintptr, cbData uint32, hConv uintptr, hszItem uintptr, wFmt, wType, dwTimeout uint32, pdwResult uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v pData=%v cbData=%v hConv=%v hszItem=%v dwTimeout=%v pdwResult=%v, (%v:)", t, pData, cbData, hConv, hszItem, dwTimeout, pdwResult, origin(2))
+ }
panic(todo(""))
}
@@ -5049,39 +5876,66 @@ func XRegSetValueExW(t *TLS, _ ...interface{}) int32 {
//
// );
func X__mingw_vsnwprintf(t *TLS, buffer uintptr, count types.Size_t, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v count=%v va=%v, (%v:)", t, buffer, count, va, origin(2))
+ }
panic(todo(""))
}
// int vprintf(const char *format, va_list ap);
-func X__mingw_vprintf(t *TLS, s, ap uintptr) int32 { return Xvprintf(t, s, ap) }
+
+func X__mingw_vprintf(t *TLS, s, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
+ return Xvprintf(t, s, ap)
+}
// int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg);
func X__mingw_vfscanf(t *TLS, stream, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int vsscanf(const char *str, const char *format, va_list ap);
func X__mingw_vsscanf(t *TLS, str, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
return Xsscanf(t, str, format, ap)
}
// int vfprintf(FILE * restrict stream, const char * restrict format, va_list arg);
func X__mingw_vfprintf(t *TLS, f uintptr, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v f=%v va=%v, (%v:)", t, f, va, origin(2))
+ }
return Xvfprintf(t, f, format, va)
}
// int vsprintf(char * restrict s, const char * restrict format, va_list arg);
func X__mingw_vsprintf(t *TLS, s, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
return Xvsprintf(t, s, format, ap)
}
// int vsnprintf(char *str, size_t size, const char *format, va_list ap);
func X__mingw_vsnprintf(t *TLS, str uintptr, size types.Size_t, format, ap uintptr) int32 {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v str=%v size=%v ap=%v, (%v:)", t, str, size, ap, origin(2))
+ }
+ return Xvsnprintf(t, str, size, format, ap)
}
// int putchar(int char)
func X_putchar(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
if _, err := fwrite(unistd.STDOUT_FILENO, []byte{byte(c)}); err != nil {
return -1
}
@@ -5090,21 +5944,33 @@ func X_putchar(t *TLS, c int32) int32 {
// int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr;);
func X__mingw_vfwscanf(t *TLS, stream uintptr, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v ap=%v, (%v:)", t, stream, ap, origin(2))
+ }
panic(todo(""))
}
// int vswscanf(const wchar_t *buffer, const wchar_t *format, va_list arglist);
func X__mingw_vswscanf(t *TLS, stream uintptr, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v ap=%v, (%v:)", t, stream, ap, origin(2))
+ }
panic(todo(""))
}
// int vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg);
func X__mingw_vfwprintf(t *TLS, stream, format, ap uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v ap=%v, (%v:)", t, ap, origin(2))
+ }
panic(todo(""))
}
// int putchar(int c);
func Xputchar(t *TLS, c int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v c=%v, (%v:)", t, c, origin(2))
+ }
panic(todo(""))
}
@@ -5116,11 +5982,17 @@ func Xputchar(t *TLS, c int32) int32 {
//
// );
func X_assert(t *TLS, message, filename uintptr, line uint32) {
+ if __ccgo_strace {
+ trc("t=%v filename=%v line=%v, (%v:)", t, filename, line, origin(2))
+ }
panic(todo(""))
}
// char *strdup(const char *s);
func X_strdup(t *TLS, s uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v s=%v, (%v:)", t, s, origin(2))
+ }
panic(todo(""))
}
@@ -5131,6 +6003,9 @@ func X_strdup(t *TLS, s uintptr) uintptr {
//
// );
func X_access(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
var path = GoString(pathname)
@@ -5177,6 +6052,9 @@ func X_access(t *TLS, pathname uintptr, mode int32) int32 {
//
// );
func XSetConsoleCtrlHandler(t *TLS, HandlerRoutine uintptr, Add int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v HandlerRoutine=%v Add=%v, (%v:)", t, HandlerRoutine, Add, origin(2))
+ }
//var fcc = &struct {
// f func(*TLS, uint32) int32
@@ -5198,11 +6076,17 @@ func XSetConsoleCtrlHandler(t *TLS, HandlerRoutine uintptr, Add int32) int32 {
// DebugBreak
func XDebugBreak(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// int _isatty( int fd );
func X_isatty(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -5233,6 +6117,9 @@ func X_isatty(t *TLS, fd int32) int32 {
//
// );
func XSetConsoleTextAttribute(t *TLS, hConsoleOutput uintptr, wAttributes uint16) int32 {
+ if __ccgo_strace {
+ trc("t=%v hConsoleOutput=%v wAttributes=%v, (%v:)", t, hConsoleOutput, wAttributes, origin(2))
+ }
r1, _, _ := syscall.Syscall(procSetConsoleTextAttribute.Addr(), 2, hConsoleOutput, uintptr(wAttributes), 0)
return int32(r1)
}
@@ -5244,6 +6131,9 @@ func XSetConsoleTextAttribute(t *TLS, hConsoleOutput uintptr, wAttributes uint16
//
// );
func XGetConsoleScreenBufferInfo(t *TLS, hConsoleOutput, lpConsoleScreenBufferInfo uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpConsoleScreenBufferInfo=%v, (%v:)", t, lpConsoleScreenBufferInfo, origin(2))
+ }
r1, _, _ := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, hConsoleOutput, lpConsoleScreenBufferInfo, 0)
return int32(r1)
}
@@ -5255,6 +6145,9 @@ func XGetConsoleScreenBufferInfo(t *TLS, hConsoleOutput, lpConsoleScreenBufferIn
//
// );
func X_popen(t *TLS, command, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
panic(todo(""))
}
@@ -5264,18 +6157,30 @@ func X_popen(t *TLS, command, mode uintptr) uintptr {
//
// );
func X_wunlink(t *TLS, filename uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v filename=%v, (%v:)", t, filename, origin(2))
+ }
panic(todo(""))
}
func Xclosedir(tls *TLS, dir uintptr) int32 {
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
panic(todo(""))
}
func Xopendir(tls *TLS, name uintptr) uintptr {
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
panic(todo(""))
}
func Xreaddir(tls *TLS, dir uintptr) uintptr {
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
panic(todo(""))
}
@@ -5285,21 +6190,33 @@ func Xreaddir(tls *TLS, dir uintptr) uintptr {
//
// );
func X_unlink(t *TLS, filename uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v filename=%v, (%v:)", t, filename, origin(2))
+ }
panic(todo(""))
}
// int pclose(FILE *stream);
func X_pclose(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
panic(todo(""))
}
// int setmode (int fd, int mode);
func Xsetmode(t *TLS, fd, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
return X_setmode(t, fd, mode)
}
// int _setmode (int fd, int mode);
func X_setmode(t *TLS, fd, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
_, ok := fdToFile(fd)
if !ok {
@@ -5320,16 +6237,25 @@ func X_setmode(t *TLS, fd, mode int32) int32 {
// int _mkdir(const char *dirname);
func X_mkdir(t *TLS, dirname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v dirname=%v, (%v:)", t, dirname, origin(2))
+ }
panic(todo(""))
}
// int _chmod( const char *filename, int pmode );
func X_chmod(t *TLS, filename uintptr, pmode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v filename=%v pmode=%v, (%v:)", t, filename, pmode, origin(2))
+ }
panic(todo(""))
}
// int _fileno(FILE *stream);
func X_fileno(t *TLS, stream uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
f, ok := winGetObject(stream).(*file)
if !ok {
t.setErrno(errno.EBADF)
@@ -5340,11 +6266,17 @@ func X_fileno(t *TLS, stream uintptr) int32 {
// void rewind(FILE *stream);
func Xrewind(t *TLS, stream uintptr) {
+ if __ccgo_strace {
+ trc("t=%v stream=%v, (%v:)", t, stream, origin(2))
+ }
Xfseek(t, stream, 0, unistd.SEEK_SET)
}
// __atomic_load_n
func X__atomic_load_n(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
@@ -5355,16 +6287,25 @@ func X__atomic_store_n(t *TLS, _ ...interface{}) int32 {
// __builtin_add_overflow
func X__builtin_add_overflow(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// __builtin_mul_overflow
func X__builtin_mul_overflow(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
// __builtin_sub_overflow
func X__builtin_sub_overflow(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
panic(todo(""))
}
@@ -5426,6 +6367,9 @@ func goWideStringNZ(p uintptr) string {
// LPWSTR GetCommandLineW();
func XGetCommandLineW(t *TLS) uintptr {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return uintptr(unsafe.Pointer(syscall.GetCommandLine()))
}
@@ -5438,6 +6382,9 @@ func XGetCommandLineW(t *TLS) uintptr {
//
// );
func XAddAccessDeniedAce(t *TLS, pAcl uintptr, dwAceRevision, AccessMask uint32, pSid uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAcl=%v AccessMask=%v pSid=%v, (%v:)", t, pAcl, AccessMask, pSid, origin(2))
+ }
panic(todo(""))
}
@@ -5451,6 +6398,9 @@ func XAddAccessDeniedAce(t *TLS, pAcl uintptr, dwAceRevision, AccessMask uint32,
//
// );
func XAddAce(t *TLS, pAcl uintptr, dwAceRevision, dwStartingAceIndex uint32, pAceList uintptr, nAceListLength uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAcl=%v dwStartingAceIndex=%v pAceList=%v nAceListLength=%v, (%v:)", t, pAcl, dwStartingAceIndex, pAceList, nAceListLength, origin(2))
+ }
panic(todo(""))
}
@@ -5462,6 +6412,9 @@ func XAddAce(t *TLS, pAcl uintptr, dwAceRevision, dwStartingAceIndex uint32, pAc
//
// );
func XGetAce(t *TLS, pAcl uintptr, dwAceIndex uint32, pAce uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAcl=%v dwAceIndex=%v pAce=%v, (%v:)", t, pAcl, dwAceIndex, pAce, origin(2))
+ }
panic(todo(""))
}
@@ -5474,6 +6427,9 @@ func XGetAce(t *TLS, pAcl uintptr, dwAceIndex uint32, pAce uintptr) int32 {
//
// );
func XGetAclInformation(t *TLS, pAcl, pAclInformation uintptr, nAclInformationLength, dwAclInformationClass uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAclInformation=%v dwAclInformationClass=%v, (%v:)", t, pAclInformation, dwAclInformationClass, origin(2))
+ }
r0, _, err := syscall.Syscall6(procGetAclInformation.Addr(), 4,
pAclInformation,
pAclInformation,
@@ -5498,6 +6454,9 @@ func XGetAclInformation(t *TLS, pAcl, pAclInformation uintptr, nAclInformationLe
//
// );
func XGetFileSecurityA(t *TLS, lpFileName uintptr, RequestedInformation uint32, pSecurityDescriptor uintptr, nLength uint32, lpnLengthNeeded uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpFileName=%v RequestedInformation=%v pSecurityDescriptor=%v nLength=%v lpnLengthNeeded=%v, (%v:)", t, lpFileName, RequestedInformation, pSecurityDescriptor, nLength, lpnLengthNeeded, origin(2))
+ }
r0, _, err := syscall.Syscall6(procGetFileSecurityA.Addr(), 5,
lpFileName,
uintptr(RequestedInformation),
@@ -5518,6 +6477,9 @@ func XGetFileSecurityA(t *TLS, lpFileName uintptr, RequestedInformation uint32,
//
// );
func XGetLengthSid(t *TLS, pSid uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v pSid=%v, (%v:)", t, pSid, origin(2))
+ }
panic(todo(""))
}
@@ -5530,6 +6492,9 @@ func XGetLengthSid(t *TLS, pSid uintptr) uint32 {
//
// );
func XGetSecurityDescriptorDacl(t *TLS, pSecurityDescriptor, lpbDaclPresent, pDacl, lpbDaclDefaulted uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v lpbDaclDefaulted=%v, (%v:)", t, lpbDaclDefaulted, origin(2))
+ }
r0, _, err := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4,
pSecurityDescriptor,
lpbDaclPresent,
@@ -5550,6 +6515,9 @@ func XGetSecurityDescriptorDacl(t *TLS, pSecurityDescriptor, lpbDaclPresent, pDa
//
// );
func XGetSidLengthRequired(t *TLS, nSubAuthorityCount uint8) int32 {
+ if __ccgo_strace {
+ trc("t=%v nSubAuthorityCount=%v, (%v:)", t, nSubAuthorityCount, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetSidLengthRequired.Addr(), 1, uintptr(nSubAuthorityCount), 0, 0)
if err != 0 {
t.setErrno(err)
@@ -5564,6 +6532,9 @@ func XGetSidLengthRequired(t *TLS, nSubAuthorityCount uint8) int32 {
//
// );
func XGetSidSubAuthority(t *TLS, pSid uintptr, nSubAuthority uint32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v pSid=%v nSubAuthority=%v, (%v:)", t, pSid, nSubAuthority, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, pSid, uintptr(nSubAuthority), 0)
if err != 0 {
t.setErrno(err)
@@ -5579,6 +6550,9 @@ func XGetSidSubAuthority(t *TLS, pSid uintptr, nSubAuthority uint32) uintptr {
//
// );
func XInitializeAcl(t *TLS, pAcl uintptr, nAclLength, dwAclRevision uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAcl=%v dwAclRevision=%v, (%v:)", t, pAcl, dwAclRevision, origin(2))
+ }
panic(todo(""))
}
@@ -5590,6 +6564,9 @@ func XInitializeAcl(t *TLS, pAcl uintptr, nAclLength, dwAclRevision uint32) int3
//
// );
func XInitializeSid(t *TLS, Sid, pIdentifierAuthority uintptr, nSubAuthorityCount uint8) int32 {
+ if __ccgo_strace {
+ trc("t=%v pIdentifierAuthority=%v nSubAuthorityCount=%v, (%v:)", t, pIdentifierAuthority, nSubAuthorityCount, origin(2))
+ }
r0, _, err := syscall.Syscall(procInitializeSid.Addr(), 3, Sid, pIdentifierAuthority, uintptr(nSubAuthorityCount))
if err != 0 {
t.setErrno(err)
@@ -5606,6 +6583,9 @@ func XInitializeSid(t *TLS, Sid, pIdentifierAuthority uintptr, nSubAuthorityCoun
//
// );
func XRaiseException(t *TLS, dwExceptionCode, dwExceptionFlags, nNumberOfArguments uint32, lpArguments uintptr) {
+ if __ccgo_strace {
+ trc("t=%v nNumberOfArguments=%v lpArguments=%v, (%v:)", t, nNumberOfArguments, lpArguments, origin(2))
+ }
panic(todo(""))
}
@@ -5615,6 +6595,9 @@ func XRaiseException(t *TLS, dwExceptionCode, dwExceptionFlags, nNumberOfArgumen
//
// );
func XSetErrorMode(t *TLS, uMode uint32) int32 {
+ if __ccgo_strace {
+ trc("t=%v uMode=%v, (%v:)", t, uMode, origin(2))
+ }
panic(todo(""))
}
@@ -5630,6 +6613,9 @@ func XSetErrorMode(t *TLS, uMode uint32) int32 {
//
// );
func XSetNamedSecurityInfoA(t *TLS, pObjectName uintptr, ObjectType, SecurityInfo uint32, psidOwner, psidGroup, pDacl, pSacl uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v pObjectName=%v SecurityInfo=%v pSacl=%v, (%v:)", t, pObjectName, SecurityInfo, pSacl, origin(2))
+ }
panic(todo(""))
}
@@ -5679,6 +6665,9 @@ func X_set_abort_behavior(t *TLS, _ ...interface{}) uint32 {
//
// );
func XOpenEventA(t *TLS, dwDesiredAccess uint32, bInheritHandle uint32, lpName uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v dwDesiredAccess=%v bInheritHandle=%v lpName=%v, (%v:)", t, dwDesiredAccess, bInheritHandle, lpName, origin(2))
+ }
r0, _, err := syscall.Syscall(procOpenEventA.Addr(), 3, uintptr(dwDesiredAccess), uintptr(bInheritHandle), lpName)
if r0 == 0 {
t.setErrno(err)
@@ -5692,16 +6681,25 @@ func XOpenEventA(t *TLS, dwDesiredAccess uint32, bInheritHandle uint32, lpName u
//
// );
func X_msize(t *TLS, memblock uintptr) types.Size_t {
+ if __ccgo_strace {
+ trc("t=%v memblock=%v, (%v:)", t, memblock, origin(2))
+ }
return types.Size_t(UsableSize(memblock))
}
// unsigned long _byteswap_ulong ( unsigned long val );
func X_byteswap_ulong(t *TLS, val ulong) ulong {
+ if __ccgo_strace {
+ trc("t=%v val=%v, (%v:)", t, val, origin(2))
+ }
return X__builtin_bswap32(t, val)
}
// unsigned __int64 _byteswap_uint64 ( unsigned __int64 val );
func X_byteswap_uint64(t *TLS, val uint64) uint64 {
+ if __ccgo_strace {
+ trc("t=%v val=%v, (%v:)", t, val, origin(2))
+ }
return X__builtin_bswap64(t, val)
}
@@ -5711,6 +6709,9 @@ func X_byteswap_uint64(t *TLS, val uint64) uint64 {
//
// );
func X_commit(t *TLS, fd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v, (%v:)", t, fd, origin(2))
+ }
return Xfsync(t, fd)
}
@@ -5721,6 +6722,9 @@ func X_commit(t *TLS, fd int32) int32 {
//
// );
func X_stati64(t *TLS, path, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v buffer=%v, (%v:)", t, buffer, origin(2))
+ }
panic(todo(""))
}
@@ -5731,6 +6735,9 @@ func X_stati64(t *TLS, path, buffer uintptr) int32 {
//
// );
func X_fstati64(t *TLS, fd int32, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buffer=%v, (%v:)", t, fd, buffer, origin(2))
+ }
panic(todo(""))
}
@@ -5741,6 +6748,9 @@ func X_fstati64(t *TLS, fd int32, buffer uintptr) int32 {
//
// );
func X_findnext32(t *TLS, handle types.Intptr_t, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v handle=%v buffer=%v, (%v:)", t, handle, buffer, origin(2))
+ }
panic(todo(""))
}
@@ -5751,6 +6761,9 @@ func X_findnext32(t *TLS, handle types.Intptr_t, buffer uintptr) int32 {
//
// );
func X_findfirst32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t {
+ if __ccgo_strace {
+ trc("t=%v fileinfo=%v, (%v:)", t, fileinfo, origin(2))
+ }
panic(todo(""))
}
@@ -5785,6 +6798,9 @@ func X_findfirst32(t *TLS, filespec, fileinfo uintptr) types.Intptr_t {
// long strtol(const char *nptr, char **endptr, int base);
func Xstrtol(t *TLS, nptr, endptr uintptr, base int32) long {
+ if __ccgo_strace {
+ trc("t=%v endptr=%v base=%v, (%v:)", t, endptr, base, origin(2))
+ }
var s uintptr = nptr
var acc ulong
@@ -5919,6 +6935,9 @@ func Xstrtol(t *TLS, nptr, endptr uintptr, base int32) long {
// unsigned long int strtoul(const char *nptr, char **endptr, int base);
func Xstrtoul(t *TLS, nptr, endptr uintptr, base int32) ulong {
+ if __ccgo_strace {
+ trc("t=%v endptr=%v base=%v, (%v:)", t, endptr, base, origin(2))
+ }
var s uintptr = nptr
var acc ulong
var c byte
@@ -6024,6 +7043,9 @@ func Xstrtoul(t *TLS, nptr, endptr uintptr, base int32) ulong {
// int __isoc99_sscanf(const char *str, const char *format, ...);
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -6033,6 +7055,9 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
// int sscanf(const char *str, const char *format, ...);
func Xsscanf(t *TLS, str, format, va uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v va=%v, (%v:)", t, va, origin(2))
+ }
r := scanf(strings.NewReader(GoString(str)), format, va)
// if dmesgs {
// dmesg("%v: %q %q: %d", origin(1), GoString(str), GoString(format), r)
@@ -6040,11 +7065,10 @@ func Xsscanf(t *TLS, str, format, va uintptr) int32 {
return r
}
-func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
- panic(todo(""))
-}
-
func Xrint(tls *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
switch {
case x == 0: // also +0 and -0
return 0
@@ -6061,21 +7085,37 @@ func Xrint(tls *TLS, x float64) float64 {
// FILE *fdopen(int fd, const char *mode);
func Xfdopen(t *TLS, fd int32, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v fd=%v mode=%v, (%v:)", t, fd, mode, origin(2))
+ }
panic(todo(""))
}
// struct tm *_gmtime64( const __time64_t *sourceTime );
func X_gmtime64(t *TLS, sourceTime uintptr) uintptr {
- panic(todo(""))
+ if __ccgo_strace {
+ trc("t=%v sourceTime=%v, (%v:)", t, sourceTime, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procGmtime64.Addr(), uintptr(sourceTime))
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return uintptr(r0)
}
// __time64_t _mktime64(struct tm *timeptr);
func X_mktime64(t *TLS, timeptr uintptr) time.X__time64_t {
+ if __ccgo_strace {
+ trc("t=%v timeptr=%v, (%v:)", t, timeptr, origin(2))
+ }
return time.X__time64_t(Xmktime(t, timeptr))
}
// char * gai_strerrorA(int ecode);
func Xgai_strerrorA(t *TLS, ecode int32) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ecode=%v, (%v:)", t, ecode, origin(2))
+ }
panic(todo(""))
}
@@ -6097,6 +7137,9 @@ type __timeb64 struct {
// void _ftime64( struct __timeb64 *timeptr );
func X_ftime64(t *TLS, timeptr uintptr) {
+ if __ccgo_strace {
+ trc("t=%v timeptr=%v, (%v:)", t, timeptr, origin(2))
+ }
tm := gotime.Now()
(*__timeb64)(unsafe.Pointer(timeptr)).time = types.X__time64_t(tm.Unix())
@@ -6107,18 +7150,30 @@ func X_ftime64(t *TLS, timeptr uintptr) {
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a))
}
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a)) & int32(3)
}
func Xchmod(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
panic(todo("%q %#o", GoString(pathname), mode))
}
@@ -6142,6 +7197,9 @@ func Xchmod(t *TLS, pathname uintptr, mode int32) int32 {
//
// );
func XGetComputerNameExW(t *TLS, nameType int32, lpBuffer, nSize uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v nameType=%v nSize=%v, (%v:)", t, nameType, nSize, origin(2))
+ }
r0, _, err := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nameType), lpBuffer, nSize)
if err != 0 {
t.setErrno(err)
@@ -6155,7 +7213,13 @@ func XGetComputerNameExW(t *TLS, nameType int32, lpBuffer, nSize uintptr) int32
// double y
//
// );
-func X_copysign(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) }
+
+func X_copysign(t *TLS, x, y float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v y=%v, (%v:)", t, y, origin(2))
+ }
+ return Xcopysign(t, x, y)
+}
// int _wtoi(
//
@@ -6163,6 +7227,9 @@ func X_copysign(t *TLS, x, y float64) float64 { return Xcopysign(t, x, y) }
//
// );
func X_wtoi(t *TLS, str uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v str=%v, (%v:)", t, str, origin(2))
+ }
panic(todo(""))
}
@@ -6187,6 +7254,9 @@ func allocW(t *TLS, v string) (r uintptr) {
//
// );
func X_wgetenv(t *TLS, varname uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v varname=%v, (%v:)", t, varname, origin(2))
+ }
if !wenvValid {
bootWinEnviron(t)
}
@@ -6210,6 +7280,9 @@ func X_wgetenv(t *TLS, varname uintptr) uintptr {
//
// );
func X_wputenv(t *TLS, envstring uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v envstring=%v, (%v:)", t, envstring, origin(2))
+ }
if !wenvValid {
bootWinEnviron(t)
}
@@ -6253,7 +7326,12 @@ func bootWinEnviron(t *TLS) {
wenvValid = true
}
-func Xfabsl(t *TLS, x float64) float64 { return math.Abs(x) }
+func Xfabsl(t *TLS, x float64) float64 {
+ if __ccgo_strace {
+ trc("t=%v x=%v, (%v:)", t, x, origin(2))
+ }
+ return math.Abs(x)
+}
func X__stdio_common_vfprintf(t *TLS, args ...interface{}) int32 { panic("TODO") }
func X__stdio_common_vfprintf_p(t *TLS, args ...interface{}) int32 { panic("TODO") }
@@ -6270,3 +7348,146 @@ func X__stdio_common_vsscanf(t *TLS, args ...interface{}) int32 { panic("TO
func X__stdio_common_vswprintf(t *TLS, args ...interface{}) int32 { panic("TODO") }
func X__stdio_common_vswprintf_s(t *TLS, args ...interface{}) int32 { panic("TODO") }
func X__stdio_common_vswscanf(t *TLS, args ...interface{}) int32 { panic("TODO") }
+
+func X_lseeki64(t *TLS, fd int32, offset int64, whence int32) int64 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
+
+ f, ok := fdToFile(fd)
+ if !ok {
+ t.setErrno(errno.EBADF)
+ return -1
+ }
+
+ n, err := syscall.Seek(f.Handle, offset, int(whence))
+ if err != nil {
+ if dmesgs {
+ dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), f._fd, offset, whenceStr(whence), n)
+ }
+ t.setErrno(err)
+ return -1
+ }
+
+ if dmesgs {
+ dmesg("%v: fd %v, off %#x, whence %v: ok", origin(1), f._fd, offset, whenceStr(whence))
+ }
+ return n
+}
+
+func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('a') < uint32(26))
+}
+
+func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('A') < uint32(26))
+}
+
+// int access(const char *pathname, int mode);
+func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v, (%v:)", t, pathname, mode, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procAccess.Addr(), uintptr(pathname), uintptr(mode))
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return int32(r0)
+}
+
+// int _vscprintf(const char *format, va_list argptr);
+func X_vscprintf(t *TLS, format uintptr, argptr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v format=%v argptr=%v, (%v:)", t, format, argptr, origin(2))
+ }
+
+ return int32(len(printf(format, argptr)))
+}
+
+// int _stat32i64(const char *path, struct _stat32i64 *buffer);
+func X_stat64i32(t *TLS, path uintptr, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v buffer=%v, (%v:)", t, path, buffer, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procStat64i32.Addr(), uintptr(path), uintptr(buffer))
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return int32(r0)
+}
+
+func AtomicLoadNUint8(ptr uintptr, memorder int32) uint8 {
+ return byte(a_load_8(ptr))
+}
+
+// struct tm *gmtime( const time_t *sourceTime );
+func Xgmtime(t *TLS, sourceTime uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v sourceTime=%v, (%v:)", t, sourceTime, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procGmtime.Addr(), uintptr(sourceTime))
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return uintptr(r0)
+}
+
+// size_t strftime(
+//
+// char *strDest,
+// size_t maxsize,
+// const char *format,
+// const struct tm *timeptr
+//
+// );
+func Xstrftime(tls *TLS, s uintptr, n size_t, f uintptr, tm uintptr) (r size_t) {
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v f=%v tm=%v, (%v:)", tls, s, n, f, tm, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
+ tt := gotime.Date(
+ int((*time.Tm)(unsafe.Pointer(tm)).Ftm_year+1900),
+ gotime.Month((*time.Tm)(unsafe.Pointer(tm)).Ftm_mon+1),
+ int((*time.Tm)(unsafe.Pointer(tm)).Ftm_mday),
+ int((*time.Tm)(unsafe.Pointer(tm)).Ftm_hour),
+ int((*time.Tm)(unsafe.Pointer(tm)).Ftm_min),
+ int((*time.Tm)(unsafe.Pointer(tm)).Ftm_sec),
+ 0,
+ gotime.UTC,
+ )
+ fmt := GoString(f)
+ var result string
+ if fmt != "" {
+ result = strftime.Format(fmt, tt)
+ }
+ switch r = size_t(len(result)); {
+ case r > n:
+ r = 0
+ default:
+ copy((*RawMem)(unsafe.Pointer(s))[:r:r], result)
+ *(*byte)(unsafe.Pointer(s + uintptr(r))) = 0
+ }
+ return r
+
+}
+
+func X__mingw_strtod(t *TLS, s uintptr, p uintptr) float64 {
+ return Xstrtod(t, s, p)
+}
+
+func Xstrtod(t *TLS, s uintptr, p uintptr) float64 {
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", t, s, p, origin(2))
+ }
+ r0, _, err := syscall.SyscallN(procStrtod.Addr(), uintptr(s), uintptr(p))
+ if err != 0 {
+ t.setErrno(err)
+ }
+ return math.Float64frombits(uint64(r0))
+}
diff --git a/vendor/modernc.org/libc/libc_windows_386.go b/vendor/modernc.org/libc/libc_windows_386.go
index d48e6f65c..5865b0ac6 100644
--- a/vendor/modernc.org/libc/libc_windows_386.go
+++ b/vendor/modernc.org/libc/libc_windows_386.go
@@ -17,6 +17,9 @@ import (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// // musl/arch/x32/ksigaction.h
// //
@@ -62,6 +65,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -84,6 +90,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LSTAT64, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -101,6 +110,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_STAT64, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -118,6 +130,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FSTAT64, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
@@ -135,6 +150,9 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -156,11 +174,17 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
panic(todo(""))
// data, _, err := unix.Syscall6(unix.SYS_MMAP2, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset>>12))
// if err != 0 {
@@ -179,6 +203,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)); err != 0 {
// if dmesgs {
@@ -196,6 +223,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
panic(todo(""))
// bp := t.Alloc(int(unsafe.Sizeof(types.X__loff_t(0))))
// defer t.Free(int(unsafe.Sizeof(types.X__loff_t(0))))
@@ -215,6 +245,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -226,6 +259,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -237,6 +273,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -248,6 +287,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
// if err != 0 {
@@ -263,6 +305,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -277,6 +322,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
// t.setErrno(err)
@@ -291,6 +339,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -305,6 +356,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
err := syscall.DeleteFile((*uint16)(unsafe.Pointer(pathname)))
if err != nil {
t.setErrno(err)
@@ -319,25 +373,11 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
}
-// int access(const char *pathname, int mode);
-func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
- // if dmesgs {
- // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // }
- // t.setErrno(err)
- // return -1
- // }
- //
- // if dmesgs {
- // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- // }
- // return 0
-}
-
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
// t.setErrno(err)
@@ -352,6 +392,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -374,6 +417,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -385,6 +431,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
// t.setErrno(err)
@@ -396,6 +445,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -408,6 +460,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
// if err != 0 {
@@ -420,6 +475,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
@@ -456,14 +514,23 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
}
func Xrecv(t *TLS, sockfd uint32, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xsend(t *TLS, sockfd uint32, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xshutdown(t *TLS, sockfd uint32, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v how=%v, (%v:)", t, sockfd, how, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SHUTDOWN, uintptr(sockfd), uintptr(how), 0); err != 0 {
// t.setErrno(err)
@@ -474,40 +541,67 @@ func Xshutdown(t *TLS, sockfd uint32, how int32) int32 {
}
func Xgetpeername(t *TLS, sockfd uint32, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xgetsockname(t *TLS, sockfd uint32, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xsocket(t *TLS, domain, type1, protocol int32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
panic(todo(""))
}
func Xbind(t *TLS, sockfd uint32, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xconnect(t *TLS, sockfd uint32, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xlisten(t *TLS, sockfd uint32, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v backlog=%v, (%v:)", t, sockfd, backlog, origin(2))
+ }
panic(todo(""))
}
func Xaccept(t *TLS, sockfd uint32, addr uintptr, addrlen uintptr) uint32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
// struct tm *_localtime32( const __time32_t *sourceTime );
func X_localtime32(t *TLS, sourceTime uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v sourceTime=%v, (%v:)", t, sourceTime, origin(2))
+ }
panic(todo(""))
}
// struct tm *_gmtime32( const __time32_t *sourceTime );
func X_gmtime32(t *TLS, sourceTime uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v sourceTime=%v, (%v:)", t, sourceTime, origin(2))
+ }
panic(todo(""))
}
@@ -519,6 +613,9 @@ func X_gmtime32(t *TLS, sourceTime uintptr) uintptr {
//
// );
func XSetWindowLongW(t *TLS, hwnd uintptr, nIndex int32, dwNewLong long) long {
+ if __ccgo_strace {
+ trc("t=%v hwnd=%v nIndex=%v dwNewLong=%v, (%v:)", t, hwnd, nIndex, dwNewLong, origin(2))
+ }
panic(todo(""))
}
@@ -529,6 +626,9 @@ func XSetWindowLongW(t *TLS, hwnd uintptr, nIndex int32, dwNewLong long) long {
//
// );
func XGetWindowLongW(t *TLS, hwnd uintptr, nIndex int32) long {
+ if __ccgo_strace {
+ trc("t=%v hwnd=%v nIndex=%v, (%v:)", t, hwnd, nIndex, origin(2))
+ }
panic(todo(""))
}
@@ -555,6 +655,9 @@ func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int32 {
//
// );
func X_fstat(t *TLS, fd int32, buffer uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v buffer=%v, (%v:)", t, fd, buffer, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
t.setErrno(EBADF)
@@ -581,3 +684,29 @@ func X_fstat(t *TLS, fd int32, buffer uintptr) int32 {
return 0
}
+
+func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
+ 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)
+}
diff --git a/vendor/modernc.org/libc/libc_windows_amd64.go b/vendor/modernc.org/libc/libc_windows_amd64.go
index 2b73ab4cc..81d67a695 100644
--- a/vendor/modernc.org/libc/libc_windows_amd64.go
+++ b/vendor/modernc.org/libc/libc_windows_amd64.go
@@ -15,6 +15,9 @@ import (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// musl/arch/x86_64/ksigaction.h
//
@@ -60,6 +63,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -82,6 +88,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -99,6 +108,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -116,6 +128,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
@@ -132,11 +147,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
panic(todo(""))
// data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
// if err != 0 {
@@ -155,6 +176,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -177,6 +201,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
@@ -194,6 +221,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -218,6 +248,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -229,6 +262,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -240,6 +276,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
// if err != 0 {
@@ -255,6 +294,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -266,6 +308,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -280,6 +325,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
// t.setErrno(err)
@@ -294,6 +342,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -308,6 +359,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
err := syscall.DeleteFile((*uint16)(unsafe.Pointer(pathname)))
if err != nil {
@@ -322,25 +376,11 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
return 0
}
-// int access(const char *pathname, int mode);
-func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
- // if dmesgs {
- // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // }
- // t.setErrno(err)
- // return -1
- // }
-
- // if dmesgs {
- // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- // }
- // return 0
-}
-
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
// t.setErrno(err)
@@ -355,6 +395,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -377,6 +420,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -388,6 +434,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
// t.setErrno(err)
@@ -399,6 +448,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -411,6 +463,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
// if err != 0 {
@@ -423,6 +478,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
@@ -459,42 +517,72 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
}
func Xrecv(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xsend(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xshutdown(t *TLS, sockfd uint64, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v how=%v, (%v:)", t, sockfd, how, origin(2))
+ }
panic(todo(""))
}
func Xgetpeername(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xgetsockname(t *TLS, sockfd uint64, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xsocket(t *TLS, domain, type1, protocol int32) uint64 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
panic(todo(""))
}
func Xbind(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xconnect(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xlisten(t *TLS, sockfd uint64, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v backlog=%v, (%v:)", t, sockfd, backlog, origin(2))
+ }
panic(todo(""))
}
func Xaccept(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) uint64 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
@@ -513,3 +601,29 @@ func XDefWindowProcW(t *TLS, _ ...interface{}) int64 {
func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int64 {
panic(todo(""))
}
+
+func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
+ 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)
+}
diff --git a/vendor/modernc.org/libc/libc_windows_arm64.go b/vendor/modernc.org/libc/libc_windows_arm64.go
index 2b73ab4cc..81d67a695 100644
--- a/vendor/modernc.org/libc/libc_windows_arm64.go
+++ b/vendor/modernc.org/libc/libc_windows_arm64.go
@@ -15,6 +15,9 @@ import (
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v signum=%v oldact=%v, (%v:)", t, signum, oldact, origin(2))
+ }
panic(todo(""))
// musl/arch/x86_64/ksigaction.h
//
@@ -60,6 +63,9 @@ func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
// int fcntl(int fd, int cmd, ... /* arg */ );
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v cmd=%v args=%v, (%v:)", t, cmd, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -82,6 +88,9 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
// int lstat(const char *pathname, struct stat *statbuf);
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -99,6 +108,9 @@ func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int stat(const char *pathname, struct stat *statbuf);
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v statbuf=%v, (%v:)", t, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 {
// if dmesgs {
@@ -116,6 +128,9 @@ func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
// int fstat(int fd, struct stat *statbuf);
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v statbuf=%v, (%v:)", t, fd, statbuf, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 {
// if dmesgs {
@@ -132,11 +147,17 @@ func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
}
func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
return Xmmap64(t, addr, length, prot, flags, fd, offset)
}
// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v addr=%v length=%v fd=%v offset=%v, (%v:)", t, addr, length, fd, offset, origin(2))
+ }
panic(todo(""))
// data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
// if err != 0 {
@@ -155,6 +176,9 @@ func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, o
// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */);
func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v old_address=%v new_size=%v flags=%v args=%v, (%v:)", t, old_address, new_size, flags, args, origin(2))
+ }
panic(todo(""))
// var arg uintptr
// if args != 0 {
@@ -177,6 +201,9 @@ func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags
// int ftruncate(int fd, off_t length);
func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v length=%v, (%v:)", t, fd, length, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 {
// if dmesgs {
@@ -194,6 +221,9 @@ func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v fd=%v offset=%v whence=%v, (%v:)", t, fd, offset, whence, origin(2))
+ }
f, ok := fdToFile(fd)
if !ok {
@@ -218,6 +248,9 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
// int utime(const char *filename, const struct utimbuf *times);
func Xutime(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -229,6 +262,9 @@ func Xutime(t *TLS, filename, times uintptr) int32 {
// unsigned int alarm(unsigned int seconds);
func Xalarm(t *TLS, seconds uint32) uint32 {
+ if __ccgo_strace {
+ trc("t=%v seconds=%v, (%v:)", t, seconds, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
// if err != 0 {
@@ -240,6 +276,9 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
// time_t time(time_t *tloc);
func Xtime(t *TLS, tloc uintptr) types.Time_t {
+ if __ccgo_strace {
+ trc("t=%v tloc=%v, (%v:)", t, tloc, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0)
// if err != 0 {
@@ -255,6 +294,9 @@ func Xtime(t *TLS, tloc uintptr) types.Time_t {
// int getrlimit(int resource, struct rlimit *rlim);
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v resource=%v rlim=%v, (%v:)", t, resource, rlim, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
// t.setErrno(err)
@@ -266,6 +308,9 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
// int mkdir(const char *path, mode_t mode);
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v path=%v mode=%v, (%v:)", t, path, mode, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 {
// t.setErrno(err)
@@ -280,6 +325,9 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
// int symlink(const char *target, const char *linkpath);
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v linkpath=%v, (%v:)", t, linkpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 {
// t.setErrno(err)
@@ -294,6 +342,9 @@ func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
// int utimes(const char *filename, const struct timeval times[2]);
func Xutimes(t *TLS, filename, times uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v times=%v, (%v:)", t, times, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 {
// t.setErrno(err)
@@ -308,6 +359,9 @@ func Xutimes(t *TLS, filename, times uintptr) int32 {
// int unlink(const char *pathname);
func Xunlink(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
err := syscall.DeleteFile((*uint16)(unsafe.Pointer(pathname)))
if err != nil {
@@ -322,25 +376,11 @@ func Xunlink(t *TLS, pathname uintptr) int32 {
return 0
}
-// int access(const char *pathname, int mode);
-func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
- panic(todo(""))
- // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 {
- // if dmesgs {
- // dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
- // }
- // t.setErrno(err)
- // return -1
- // }
-
- // if dmesgs {
- // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
- // }
- // return 0
-}
-
// int rmdir(const char *pathname);
func Xrmdir(t *TLS, pathname uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v, (%v:)", t, pathname, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 {
// t.setErrno(err)
@@ -355,6 +395,9 @@ func Xrmdir(t *TLS, pathname uintptr) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v pathname=%v mode=%v dev=%v, (%v:)", t, pathname, mode, dev, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
// t.setErrno(err)
@@ -377,6 +420,9 @@ func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32
// int link(const char *oldpath, const char *newpath);
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v newpath=%v, (%v:)", t, newpath, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
// t.setErrno(err)
@@ -388,6 +434,9 @@ func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
// int pipe(int pipefd[2]);
func Xpipe(t *TLS, pipefd uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pipefd=%v, (%v:)", t, pipefd, origin(2))
+ }
panic(todo(""))
// if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 0); err != 0 {
// t.setErrno(err)
@@ -399,6 +448,9 @@ func Xpipe(t *TLS, pipefd uintptr) int32 {
// int dup2(int oldfd, int newfd);
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v newfd=%v, (%v:)", t, newfd, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
// if err != 0 {
@@ -411,6 +463,9 @@ func Xdup2(t *TLS, oldfd, newfd int32) int32 {
// 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 {
+ if __ccgo_strace {
+ trc("t=%v buf=%v bufsize=%v, (%v:)", t, buf, bufsize, origin(2))
+ }
panic(todo(""))
// n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize))
// if err != 0 {
@@ -423,6 +478,9 @@ func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
// FILE *fopen64(const char *pathname, const char *mode);
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
+ if __ccgo_strace {
+ trc("t=%v mode=%v, (%v:)", t, mode, origin(2))
+ }
m := strings.ReplaceAll(GoString(mode), "b", "")
var flags int
@@ -459,42 +517,72 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
}
func Xrecv(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xsend(t *TLS, sockfd uint64, buf uintptr, len, flags int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v buf=%v flags=%v, (%v:)", t, sockfd, buf, flags, origin(2))
+ }
panic(todo(""))
}
func Xshutdown(t *TLS, sockfd uint64, how int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v how=%v, (%v:)", t, sockfd, how, origin(2))
+ }
panic(todo(""))
}
func Xgetpeername(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xgetsockname(t *TLS, sockfd uint64, addr, addrlen uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addrlen=%v, (%v:)", t, sockfd, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xsocket(t *TLS, domain, type1, protocol int32) uint64 {
+ if __ccgo_strace {
+ trc("t=%v protocol=%v, (%v:)", t, protocol, origin(2))
+ }
panic(todo(""))
}
func Xbind(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xconnect(t *TLS, sockfd uint64, addr uintptr, addrlen int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
func Xlisten(t *TLS, sockfd uint64, backlog int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v backlog=%v, (%v:)", t, sockfd, backlog, origin(2))
+ }
panic(todo(""))
}
func Xaccept(t *TLS, sockfd uint64, addr uintptr, addrlen uintptr) uint64 {
+ if __ccgo_strace {
+ trc("t=%v sockfd=%v addr=%v addrlen=%v, (%v:)", t, sockfd, addr, addrlen, origin(2))
+ }
panic(todo(""))
}
@@ -513,3 +601,29 @@ func XDefWindowProcW(t *TLS, _ ...interface{}) int64 {
func XSendMessageTimeoutW(t *TLS, _ ...interface{}) int64 {
panic(todo(""))
}
+
+func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
+ 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)
+}
diff --git a/vendor/modernc.org/libc/limits/capi_illumos_amd64.go b/vendor/modernc.org/libc/limits/capi_illumos_amd64.go
new file mode 100644
index 000000000..b82ba4653
--- /dev/null
+++ b/vendor/modernc.org/libc/limits/capi_illumos_amd64.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_illumos_amd64.go -pkgname limits', DO NOT EDIT.
+
+package limits
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/limits/capi_linux_loong64.go b/vendor/modernc.org/libc/limits/capi_linux_loong64.go
index dbe66d824..820acc5fd 100644
--- a/vendor/modernc.org/libc/limits/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/limits/capi_linux_loong64.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 -ignore-unsupported-alignment -o limits/limits_linux_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_linux_loong64.go -pkgname limits', DO NOT EDIT.
package limits
diff --git a/vendor/modernc.org/libc/limits/capi_linux_mips64le.go b/vendor/modernc.org/libc/limits/capi_linux_mips64le.go
new file mode 100644
index 000000000..dbe66d824
--- /dev/null
+++ b/vendor/modernc.org/libc/limits/capi_linux_mips64le.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_linux_amd64.go -pkgname limits', DO NOT EDIT.
+
+package limits
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/limits/limits_illumos_amd64.go b/vendor/modernc.org/libc/limits/limits_illumos_amd64.go
new file mode 100644
index 000000000..6d83302fa
--- /dev/null
+++ b/vendor/modernc.org/libc/limits/limits_illumos_amd64.go
@@ -0,0 +1,1234 @@
+// 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_illumos_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 = 2096640 // limits.h:73:1:
+ BC_BASE_MAX = 99 // limits.h:175:1:
+ BC_DIM_MAX = 2048 // limits.h:176:1:
+ BC_SCALE_MAX = 99 // limits.h:177:1:
+ BC_STRING_MAX = 1000 // limits.h:178:1:
+ CHARCLASS_NAME_MAX = 14 // limits.h:206:1:
+ CHAR_BIT = 8 // limits.h:64:1:
+ CHAR_MAX = 127 // limits.h:99:1:
+ CHAR_MIN = -128 // limits.h:97:1:
+ CHILD_MAX = 25 // limits.h:272:1:
+ COLL_WEIGHTS_MAX = 10 // limits.h:179:1:
+ DBL_DIG = 15 // limits.h:226:1:
+ DBL_MAX = 1.7976931348623157081452e+308 // limits.h:227:1:
+ DBL_MIN = 2.2250738585072013830903e-308 // limits.h:236:1:
+ EXPR_NEST_MAX = 32 // limits.h:180:1:
+ FCHR_MAX = 1048576 // limits.h:251:1:
+ FLT_DIG = 6 // limits.h:229:1:
+ FLT_MAX = 3.4028234663852885981170e+38 // limits.h:230:1:
+ FLT_MIN = 1.1754943508222875079688e-38 // limits.h:238:1:
+ INT16_MAX = 32767 // int_limits.h:93:1:
+ INT16_MIN = -32768 // int_limits.h:211:1:
+ INT32_MAX = 2147483647 // int_limits.h:94:1:
+ INT32_MIN = -2147483648 // int_limits.h:212:1:
+ INT64_MAX = 9223372036854775807 // int_limits.h:96:1:
+ INT64_MIN = -9223372036854775808 // int_limits.h:214:1:
+ INT8_MAX = 127 // int_limits.h:92:1:
+ INT8_MIN = -128 // int_limits.h:210:1:
+ INTMAX_MAX = 9223372036854775807 // int_limits.h:111:1:
+ INTMAX_MIN = -9223372036854775808 // int_limits.h:220:1:
+ INTPTR_MAX = 9223372036854775807 // int_limits.h:157:1:
+ INTPTR_MIN = -9223372036854775808 // int_limits.h:241:1:
+ INT_FAST16_MAX = 2147483647 // int_limits.h:137:1:
+ INT_FAST16_MIN = -2147483648 // int_limits.h:233:1:
+ INT_FAST32_MAX = 2147483647 // int_limits.h:138:1:
+ INT_FAST32_MIN = -2147483648 // int_limits.h:234:1:
+ INT_FAST64_MAX = 9223372036854775807 // int_limits.h:140:1:
+ INT_FAST64_MIN = -9223372036854775808 // int_limits.h:236:1:
+ INT_FAST8_MAX = 127 // int_limits.h:136:1:
+ INT_FAST8_MIN = -128 // int_limits.h:232:1:
+ INT_LEAST16_MAX = 32767 // int_limits.h:123:1:
+ INT_LEAST16_MIN = -32768 // int_limits.h:226:1:
+ INT_LEAST32_MAX = 2147483647 // int_limits.h:124:1:
+ INT_LEAST32_MIN = -2147483648 // int_limits.h:227:1:
+ INT_LEAST64_MAX = 9223372036854775807 // int_limits.h:126:1:
+ INT_LEAST64_MIN = -9223372036854775808 // int_limits.h:229:1:
+ INT_LEAST8_MAX = 127 // int_limits.h:122:1:
+ INT_LEAST8_MIN = -128 // int_limits.h:225:1:
+ INT_MAX = 2147483647 // limits.h:120:1:
+ INT_MIN = -2147483648 // limits.h:118:1:
+ IOV_MAX = 1024 // limits.h:22:1:
+ LINE_MAX = 2048 // limits.h:181:1:
+ LLONG_MAX = 9223372036854775807 // limits.h:142:1:
+ LLONG_MIN = -9223372036854775808 // limits.h:140:1:
+ LOGIN_NAME_MAX = 33 // limits.h:306:1:
+ LOGIN_NAME_MAX_TRAD = 9 // limits.h:308:1:
+ LOGNAME_MAX = 32 // limits.h:303:1:
+ LOGNAME_MAX_TRAD = 8 // limits.h:307:1:
+ LONG_BIT = 64 // limits.h:219:1:
+ LONG_LONG_MAX = 9223372036854775807 // limits.h:154:1:
+ LONG_LONG_MIN = -9223372036854775808 // limits.h:152:1:
+ LONG_MAX = 9223372036854775807 // limits.h:131:1:
+ LONG_MIN = -9223372036854775808 // limits.h:129:1:
+ MAX_CANON = 256 // limits.h:84:1:
+ MAX_INPUT = 512 // limits.h:88:1:
+ MB_LEN_MAX = 5 // limits_iso.h:58:1:
+ NAME_MAX = 255 // limits.h:270:1:
+ NGROUPS_MAX = 16 // limits.h:91:1:
+ NL_ARGMAX = 9 // limits.h:208:1:
+ NL_LANGMAX = 14 // limits.h:210:1:
+ NL_MSGMAX = 32767 // limits.h:211:1:
+ NL_NMAX = 1 // limits.h:212:1:
+ NL_SETMAX = 255 // limits.h:213:1:
+ NL_TEXTMAX = 2048 // limits.h:214:1:
+ NZERO = 20 // limits.h:215:1:
+ OPEN_MAX = 256 // limits.h:274:1:
+ PASS_MAX = 256 // limits.h:203:1:
+ PATH_MAX = 1024 // limits.h:94:1:
+ PID_MAX = 999999 // limits.h:252:1:
+ PIPE_BUF = 5120 // limits.h:99:1:
+ PIPE_MAX = 5120 // limits.h:277:1:
+ PTRDIFF_MAX = 9223372036854775807 // int_limits.h:166:1:
+ PTRDIFF_MIN = -9223372036854775808 // int_limits.h:248:1:
+ RE_DUP_MAX = 255 // limits.h:183: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:
+ SIG_ATOMIC_MAX = 2147483647 // int_limits.h:186:1:
+ SIG_ATOMIC_MIN = -2147483648 // int_limits.h:255:1:
+ SIZE_MAX = 18446744073709551615 // int_limits.h:179:1:
+ SSIZE_MAX = 9223372036854775807 // limits.h:63:1:
+ STD_BLK = 1024 // limits.h:279:1:
+ SYMLINK_MAX = 1024 // limits.h:97:1:
+ SYSPID_MAX = 1 // limits.h:282:1:
+ SYS_NMLN = 257 // limits.h:285:1:
+ TMP_MAX = 17576 // limits.h:102:1:
+ TTYNAME_MAX = 128 // limits.h:310:1:
+ UCHAR_MAX = 255 // limits.h:82:1:
+ UID_MAX = 2147483647 // limits.h:280:1:
+ UINT16_MAX = 65535 // int_limits.h:102:1:
+ UINT32_MAX = 4294967295 // int_limits.h:103:1:
+ UINT64_MAX = 18446744073709551615 // int_limits.h:105:1:
+ UINT8_MAX = 255 // int_limits.h:101:1:
+ UINTMAX_MAX = 18446744073709551615 // int_limits.h:117:1:
+ UINTPTR_MAX = 18446744073709551615 // int_limits.h:158:1:
+ UINT_FAST16_MAX = 4294967295 // int_limits.h:144:1:
+ UINT_FAST32_MAX = 4294967295 // int_limits.h:145:1:
+ UINT_FAST64_MAX = 18446744073709551615 // int_limits.h:147:1:
+ UINT_FAST8_MAX = 255 // int_limits.h:143:1:
+ UINT_LEAST16_MAX = 65535 // int_limits.h:130:1:
+ UINT_LEAST32_MAX = 4294967295 // int_limits.h:131:1:
+ UINT_LEAST64_MAX = 18446744073709551615 // int_limits.h:133:1:
+ UINT_LEAST8_MAX = 255 // int_limits.h:129: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 = 18446744073709551615 // limits.h:135:1:
+ USHRT_MAX = 65535 // limits.h:113:1:
+ USI_MAX = 4294967295 // limits.h:281:1:
+ WCHAR_MAX = 2147483647 // int_limits.h:195:1:
+ WCHAR_MIN = -2147483648 // int_limits.h:264:1:
+ WINT_MAX = 2147483647 // int_limits.h:200:1:
+ WINT_MIN = -2147483648 // int_limits.h:269:1:
+ WORD_BIT = 32 // limits.h:217:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_ARG_MAX32 = 1048320 // limits.h:70:1:
+ X_ARG_MAX64 = 2096640 // limits.h:71:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCK_T = 0 // limits.h:291:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_GCC_LIMITS_H_ = 0 // limits.h:30:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_LIMITS_ISO_H = 0 // limits_iso.h:44:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LIMITS_H = 0 // limits.h:36:1:
+ X_LIMITS_H___ = 0 // limits.h:60:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_PASS_MAX = 256 // limits.h:198:1:
+ X_PASS_MAX_XPG = 8 // limits.h:197:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX2_BC_BASE_MAX = 99 // limits.h:164:1:
+ X_POSIX2_BC_DIM_MAX = 2048 // limits.h:165:1:
+ X_POSIX2_BC_SCALE_MAX = 99 // limits.h:166:1:
+ X_POSIX2_BC_STRING_MAX = 1000 // limits.h:167:1:
+ X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:173:1:
+ X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:168:1:
+ X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:169:1:
+ X_POSIX2_LINE_MAX = 2048 // limits.h:170:1:
+ X_POSIX2_RE_DUP_MAX = 255 // limits.h:171:1:
+ X_POSIX_AIO_LISTIO_MAX = 2 // limits.h:110:1:
+ X_POSIX_AIO_MAX = 1 // limits.h:111:1:
+ X_POSIX_ARG_MAX = 4096 // limits.h:112:1:
+ X_POSIX_CHILD_MAX = 6 // limits.h:116:1:
+ X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:118:1:
+ X_POSIX_DELAYTIMER_MAX = 32 // limits.h:119:1:
+ X_POSIX_HOST_NAME_MAX = 255 // limits.h:155:1:
+ X_POSIX_LINK_MAX = 8 // limits.h:120:1:
+ X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:149:1:
+ X_POSIX_MAX_CANON = 255 // limits.h:121:1:
+ X_POSIX_MAX_INPUT = 255 // limits.h:122:1:
+ X_POSIX_MQ_OPEN_MAX = 8 // limits.h:123:1:
+ X_POSIX_MQ_PRIO_MAX = 32 // limits.h:124:1:
+ X_POSIX_NAME_MAX = 14 // limits.h:125:1:
+ X_POSIX_NGROUPS_MAX = 0 // limits.h:131:1:
+ X_POSIX_OPEN_MAX = 16 // limits.h:132:1:
+ X_POSIX_PATH_MAX = 255 // limits.h:133:1:
+ X_POSIX_PIPE_BUF = 512 // limits.h:135:1:
+ X_POSIX_RE_DUP_MAX = 255 // limits.h:156:1:
+ X_POSIX_RTSIG_MAX = 8 // limits.h:136:1:
+ X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:137:1:
+ X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:138:1:
+ X_POSIX_SIGQUEUE_MAX = 32 // limits.h:139:1:
+ X_POSIX_SSIZE_MAX = 32767 // limits.h:140:1:
+ X_POSIX_STREAM_MAX = 8 // limits.h:141:1:
+ X_POSIX_SYMLINK_MAX = 255 // limits.h:157:1:
+ X_POSIX_SYMLOOP_MAX = 8 // limits.h:158:1:
+ X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:150:1:
+ X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:151:1:
+ X_POSIX_THREAD_THREADS_MAX = 64 // limits.h:152:1:
+ X_POSIX_TIMER_MAX = 32 // limits.h:142:1:
+ X_POSIX_TTY_NAME_MAX = 9 // limits.h:153:1:
+ X_POSIX_TZNAME_MAX = 3 // limits.h:146:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_LIMITS_H = 0 // int_limits.h:39:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_LIMITS_H = 0 // limits.h:16:1:
+ X_XOPEN_IOV_MAX = 16 // limits.h:244:1:
+ X_XOPEN_NAME_MAX = 255 // limits.h:245:1:
+ X_XOPEN_PATH_MAX = 1024 // limits.h:246:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+
+// Copyright (C) 1992-2022 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+//
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// This administrivia gets added to the beginning of limits.h
+// if the system has its own version of limits.h.
+
+// We use _GCC_LIMITS_H_ because we want this not to match
+// any macros that the system's limits.h uses for its own purposes.
+
+// Use "..." so that we find syslimits.h only in this same directory.
+// syslimits.h stands for the system's own limits.h file.
+// If we can use it ok unmodified, then we install this text.
+// If fixincludes fixes it, then the fixed version is installed
+// instead of this text.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright (c) 2013 Gary Mills
+// Copyright 2017 RackTop Systems.
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <limits.h>.
+
+// Sizes of integral types
+
+// min value of a "long int"
+// max value of a "long int"
+// max value of "unsigned long int"
+// min value of a long long
+// max value of a long long
+// max value of "unsigned long long
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+// Copyright 2015 Joyent, Inc. All rights reserved.
+
+// Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions and limits which is namespace clean with respect to
+// all standards.
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/int_limits.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <limits.h> This nested inclusion is disabled for strictly
+// ANSI-C conforming compilations. The *_MIN
+// definitions are not visible to POSIX or XPG
+// conforming applications (due to what may be
+// a bug in the specification - this is under
+// investigation)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Limits
+//
+// The following define the limits for the types defined in <sys/int_types.h>.
+//
+// INTMAX_MIN (minimum value of the largest supported signed integer type),
+// INTMAX_MAX (maximum value of the largest supported signed integer type),
+// and UINTMAX_MAX (maximum value of the largest supported unsigned integer
+// type) can be set to implementation defined limits.
+//
+// NOTE : A programmer can test to see whether an implementation supports
+// a particular size of integer by testing if the macro that gives the
+// maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
+// tests false, the implementation does not support unsigned 64 bit integers.
+//
+// The type of these macros is intentionally unspecified.
+//
+// The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
+// where the ABI specifies "char" as unsigned when the translation mode is
+// not ANSI-C.
+
+// The following 2 macros are provided for testing whether the types
+// intptr_t and uintptr_t (integers large enough to hold a void *) are
+// defined in this header. They are needed in case the architecture can't
+// represent a pointer in any standard integral type.
+
+// Maximum limits of ptrdiff_t defined in <sys/types.h>
+
+// Maximum value of a "size_t". SIZE_MAX was previously defined
+// in <limits.h>, however, the standards specify it be defined
+// in <stdint.h>. The <stdint.h> headers includes this header as
+// does <limits.h>. The value of SIZE_MAX should not deviate
+// from the value of ULONG_MAX defined <sys/types.h>.
+
+// Maximum limit of sig_atomic_t defined in <sys/types.h>
+
+// Maximum limit of wchar_t. The WCHAR_* macros are also
+// defined in <iso/wchar_iso.h>, but inclusion of that header
+// will break ISO/IEC C namespace.
+
+// Maximum limit of wint_t
+
+// It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
+// when including <limits.h> that the suffix _MAX is reserved but not the
+// suffix _MIN. However, until that issue is resolved....
+
+// Minimum value of a pointer-holding signed integer type
+
+// Minimum limits of ptrdiff_t defined in <sys/types.h>
+
+// Minimum limit of sig_atomic_t defined in <sys/types.h>
+
+// Minimum limit of wchar_t. The WCHAR_* macros are also
+// defined in <iso/wchar_iso.h>, but inclusion of that header
+// will break ISO/IEC C namespace.
+
+// Minimum limit of wint_t
+
+// ARG_MAX is calculated as follows:
+// NCARGS - space for other stuff on initial stack
+// like aux vectors, saved registers, etc..
+
+// These two symbols have their historical values, the actual buffer is
+// larger.
+
+// POSIX conformant definitions - An implementation may define
+// other symbols which reflect the actual implementation. Alternate
+// definitions may not be as restrictive as the POSIX definitions.
+// POSIX.1c conformant
+// UNIX 03 conformant
+
+// POSIX.2 and XPG4-XSH4 conformant definitions
+
+// UNIX 03 conformant
+
+// For dual definitions for PASS_MAX and sysconf.c
+
+// NLS printf() and scanf()
+
+// Marked as LEGACY in SUSv2 and removed in UNIX 03
+// of a double
+// of a "float"
+
+// Marked as LEGACY in SUSv1 and removed in SUSv2
+// of a double
+// of a float
+
+// POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
+// related text states:
+//
+// A definition of one of the values from Table 2-5 shall be omitted from the
+// <limits.h> on specific implementations where the corresponding value is
+// equal to or greater than the stated minimum, but where the value can vary
+// depending on the file to which it is applied. The actual value supported for
+// a specific pathname shall be provided by the pathconf() (5.7.1) function.
+//
+// This is clear that any machine supporting multiple file system types
+// and/or a network should not include this define, regardless of protection
+// by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. We chose to ignore that
+// and provide it anyway for compatibility with other platforms that don't
+// follow the spec as precisely as they should. Its usage is discouraged.
+
+type Clock_t = int64 /* limits.h:292:14 */ // System Private interface to sysconf()
+
+// Increased for illumos
+
+// Copyright (C) 1991-2022 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+//
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Number of bits in a `char'.
+
+// Maximum length of a multibyte character.
+
+// Minimum and maximum values a `signed char' can hold.
+
+// Maximum value an `unsigned char' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `char' can hold.
+
+// Minimum and maximum values a `signed short int' can hold.
+
+// Maximum value an `unsigned short int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed int' can hold.
+
+// Maximum value an `unsigned int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed long int' can hold.
+// (Same as `int').
+
+// Maximum value an `unsigned long int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed long long int' can hold.
+
+// Maximum value an `unsigned long long int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed long long int' can hold.
+
+// Maximum value an `unsigned long long int' can hold. (Minimum is 0).
+
+// This administrivia gets added to the end of limits.h
+// if the system has its own version of limits.h.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/limits/limits_linux_loong64.go b/vendor/modernc.org/libc/limits/limits_linux_loong64.go
index a9e1bafde..a5e9f1442 100644
--- a/vendor/modernc.org/libc/limits/limits_linux_loong64.go
+++ b/vendor/modernc.org/libc/limits/limits_linux_loong64.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 -ignore-unsupported-alignment -o limits/limits_linux_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_linux_loong64.go -pkgname limits', DO NOT EDIT.
package limits
@@ -46,7 +46,7 @@ const (
PIPE_BUF = 4096 // limits.h:14:1:
PTHREAD_DESTRUCTOR_ITERATIONS = 4 // local_lim.h:69:1:
PTHREAD_KEYS_MAX = 1024 // local_lim.h:64:1:
- PTHREAD_STACK_MIN = 16384 // local_lim.h:81:1:
+ PTHREAD_STACK_MIN = 131072 // pthread_stack_min.h:20:1:
RE_DUP_MAX = 32767 // posix2_lim.h:88:1:
RTSIG_MAX = 32 // limits.h:19:1:
SCHAR_MAX = 127 // limits.h:75:1:
@@ -64,17 +64,28 @@ const (
XATTR_LIST_MAX = 65536 // limits.h:17:1:
XATTR_NAME_MAX = 255 // limits.h:15:1:
XATTR_SIZE_MAX = 65536 // limits.h:16:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
X_BITS_POSIX1_LIM_H = 1 // posix1_lim.h:25:1:
X_BITS_POSIX2_LIM_H = 1 // posix2_lim.h:23:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
X_FEATURES_H = 1 // features.h:19:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
X_GCC_LIMITS_H_ = 0 // limits.h:30:1:
X_LIBC_LIMITS_H_ = 1 // limits.h:23:1:
X_LIMITS_H___ = 0 // limits.h:60:1:
X_LINUX_LIMITS_H = 0 // limits.h:3:1:
- X_LP64 = 1 // <predefined>:284:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
X_POSIX2_BC_BASE_MAX = 99 // posix2_lim.h:27:1:
X_POSIX2_BC_DIM_MAX = 2048 // posix2_lim.h:30:1:
X_POSIX2_BC_SCALE_MAX = 99 // posix2_lim.h:33:1:
@@ -89,7 +100,7 @@ const (
X_POSIX_ARG_MAX = 4096 // posix1_lim.h:38:1:
X_POSIX_CHILD_MAX = 25 // posix1_lim.h:42:1:
X_POSIX_CLOCKRES_MIN = 20000000 // posix1_lim.h:157:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
X_POSIX_DELAYTIMER_MAX = 32 // posix1_lim.h:48:1:
X_POSIX_HOST_NAME_MAX = 255 // posix1_lim.h:52:1:
X_POSIX_LINK_MAX = 8 // posix1_lim.h:55:1:
@@ -108,7 +119,7 @@ const (
X_POSIX_SEM_NSEMS_MAX = 256 // posix1_lim.h:110:1:
X_POSIX_SEM_VALUE_MAX = 32767 // posix1_lim.h:113:1:
X_POSIX_SIGQUEUE_MAX = 32 // posix1_lim.h:116:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
X_POSIX_SSIZE_MAX = 32767 // posix1_lim.h:119:1:
X_POSIX_STREAM_MAX = 8 // posix1_lim.h:122:1:
X_POSIX_SYMLINK_MAX = 255 // posix1_lim.h:125:1:
@@ -119,10 +130,10 @@ const (
X_POSIX_TIMER_MAX = 32 // posix1_lim.h:132:1:
X_POSIX_TTY_NAME_MAX = 9 // posix1_lim.h:135:1:
X_POSIX_TZNAME_MAX = 6 // posix1_lim.h:139:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -143,7 +154,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -178,7 +189,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If fixincludes fixes it, then the fixed version is installed
// instead of this text.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -198,7 +209,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
// Handle feature test macros at the start of a header.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -223,7 +234,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// header is included, not when the first system header is
// included.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -255,6 +266,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -270,12 +283,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -316,6 +332,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -386,6 +404,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -404,9 +478,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -434,7 +514,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -455,23 +536,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -484,6 +566,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -504,8 +588,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -515,6 +599,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -543,8 +630,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -575,11 +667,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -589,11 +684,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -627,6 +738,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -640,6 +767,23 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
@@ -650,8 +794,26 @@ type X__float128 = float64 /* <builtin>:47:21 */
// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
// macro. Most but not all symbols enabled by that macro in TS
-// 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
-// still require that macro in C2X.
+// 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
+// Annex F still require a new feature test macro
+// __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
+// __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
+// 18661-1 are not included in C2X (and thus should depend on
+// __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
+// enabled).
+//
+// __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
+// 18661-1 not included in C2X.
+//
+// __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
+// 18661-1 that are also included in C2X (with no feature test macro
+// required in C2X).
+//
+// __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
+// that are included in C2X but conditional on
+// __STDC_WANT_IEC_60559_EXT__. (There are currently no features
+// conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
+// 18661-1.)
// ISO/IEC TS 18661-4:2015 defines the
// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
@@ -682,8 +844,12 @@ type X__float128 = float64 /* <builtin>:47:21 */
// GCC 7, or if _GNU_SOURCE rather than
// __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature.
+// The macros for _Bool are not defined by GCC's <limits.h> before GCC
+// 11, or if _GNU_SOURCE is defined rather than enabling C2x support
+// with -std.
+
// POSIX adds things to <limits.h>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -704,9 +870,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// Never include this file directly; use <limits.h> instead.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
// These are the standard-mandated minimum values.
@@ -770,13 +949,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Maximum number of characters in a tty name.
-// Maximum length of a timezone name (element of `tzname').
+// Maximum length of a time zone abbreviation (element of 'tzname').
// Maximum clock resolution in nanoseconds.
// Get the implementation-specific values for the above.
// Minimum guaranteed maximum values for system limits. Linux version.
-// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// Copyright (C) 1993-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -816,10 +995,47 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The number of threads per process.
// We have no predefined limit on the number of threads.
-// Maximum amount by which a process can descrease its asynchronous I/O
+// Maximum amount by which a process can decrease its asynchronous I/O
// priority level.
-// Minimum size for a thread. We are free to choose a reasonable value.
+// Arrange for the definition of PTHREAD_STACK_MIN.
+// Definition of PTHREAD_STACK_MIN, possibly dynamic.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of PTHREAD_STACK_MIN. LoongArch Linux version.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 2.1 of the
+// License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+// Minimum size for a thread. At least two pages with 64k pages.
// Maximum number of timer expiration overruns.
@@ -840,7 +1056,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This value is a guaranteed minimum maximum.
// The current maximum can be got from `sysconf'.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -887,7 +1103,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This value is defined like this in regex.h.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
diff --git a/vendor/modernc.org/libc/limits/limits_linux_mips64le.go b/vendor/modernc.org/libc/limits/limits_linux_mips64le.go
new file mode 100644
index 000000000..a9e1bafde
--- /dev/null
+++ b/vendor/modernc.org/libc/limits/limits_linux_mips64le.go
@@ -0,0 +1,943 @@
+// 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_linux_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 (
+ AIO_PRIO_DELTA_MAX = 20 // local_lim.h:78:1:
+ BC_BASE_MAX = 99 // posix2_lim.h:63:1:
+ BC_DIM_MAX = 2048 // posix2_lim.h:66:1:
+ BC_SCALE_MAX = 99 // posix2_lim.h:69:1:
+ BC_STRING_MAX = 1000 // posix2_lim.h:72:1:
+ CHARCLASS_NAME_MAX = 2048 // posix2_lim.h:84:1:
+ CHAR_BIT = 8 // limits.h:64:1:
+ CHAR_MAX = 127 // limits.h:99:1:
+ CHAR_MIN = -128 // limits.h:97:1:
+ COLL_WEIGHTS_MAX = 255 // posix2_lim.h:75:1:
+ DELAYTIMER_MAX = 2147483647 // local_lim.h:84:1:
+ EXPR_NEST_MAX = 32 // posix2_lim.h:78:1:
+ HOST_NAME_MAX = 64 // local_lim.h:93:1:
+ INT_MAX = 2147483647 // limits.h:120:1:
+ INT_MIN = -2147483648 // limits.h:118:1:
+ LINE_MAX = 2048 // posix2_lim.h:81:1:
+ LLONG_MAX = 9223372036854775807 // limits.h:142:1:
+ LLONG_MIN = -9223372036854775808 // limits.h:140:1:
+ LOGIN_NAME_MAX = 256 // local_lim.h:90:1:
+ LONG_MAX = 9223372036854775807 // limits.h:131:1:
+ LONG_MIN = -9223372036854775808 // limits.h:129:1:
+ MAX_CANON = 255 // limits.h:10:1:
+ MAX_INPUT = 255 // limits.h:11:1:
+ MB_LEN_MAX = 16 // limits.h:32:1:
+ MQ_PRIO_MAX = 32768 // local_lim.h:96:1:
+ NAME_MAX = 255 // limits.h:12:1:
+ NGROUPS_MAX = 65536 // limits.h:7:1:
+ PATH_MAX = 4096 // limits.h:13:1:
+ PIPE_BUF = 4096 // limits.h:14:1:
+ PTHREAD_DESTRUCTOR_ITERATIONS = 4 // local_lim.h:69:1:
+ PTHREAD_KEYS_MAX = 1024 // local_lim.h:64:1:
+ PTHREAD_STACK_MIN = 16384 // local_lim.h:81:1:
+ RE_DUP_MAX = 32767 // posix2_lim.h:88:1:
+ RTSIG_MAX = 32 // limits.h:19:1:
+ SCHAR_MAX = 127 // limits.h:75:1:
+ SCHAR_MIN = -128 // limits.h:73:1:
+ SEM_VALUE_MAX = 2147483647 // local_lim.h:99:1:
+ SHRT_MAX = 32767 // limits.h:106:1:
+ SHRT_MIN = -32768 // limits.h:104:1:
+ SSIZE_MAX = 9223372036854775807 // posix1_lim.h:169:1:
+ TTY_NAME_MAX = 32 // local_lim.h:87:1:
+ UCHAR_MAX = 255 // limits.h:82:1:
+ UINT_MAX = 4294967295 // limits.h:124:1:
+ ULLONG_MAX = 18446744073709551615 // limits.h:146:1:
+ ULONG_MAX = 18446744073709551615 // limits.h:135:1:
+ USHRT_MAX = 65535 // limits.h:113:1:
+ XATTR_LIST_MAX = 65536 // limits.h:17:1:
+ XATTR_NAME_MAX = 255 // limits.h:15:1:
+ XATTR_SIZE_MAX = 65536 // limits.h:16:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_POSIX1_LIM_H = 1 // posix1_lim.h:25:1:
+ X_BITS_POSIX2_LIM_H = 1 // posix2_lim.h:23:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_LIMITS_H_ = 0 // limits.h:30:1:
+ X_LIBC_LIMITS_H_ = 1 // limits.h:23:1:
+ X_LIMITS_H___ = 0 // limits.h:60:1:
+ X_LINUX_LIMITS_H = 0 // limits.h:3:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX2_BC_BASE_MAX = 99 // posix2_lim.h:27:1:
+ X_POSIX2_BC_DIM_MAX = 2048 // posix2_lim.h:30:1:
+ X_POSIX2_BC_SCALE_MAX = 99 // posix2_lim.h:33:1:
+ X_POSIX2_BC_STRING_MAX = 1000 // posix2_lim.h:36:1:
+ X_POSIX2_CHARCLASS_NAME_MAX = 14 // posix2_lim.h:55:1:
+ X_POSIX2_COLL_WEIGHTS_MAX = 2 // posix2_lim.h:40:1:
+ X_POSIX2_EXPR_NEST_MAX = 32 // posix2_lim.h:44:1:
+ X_POSIX2_LINE_MAX = 2048 // posix2_lim.h:47:1:
+ X_POSIX2_RE_DUP_MAX = 255 // posix2_lim.h:51:1:
+ X_POSIX_AIO_LISTIO_MAX = 2 // posix1_lim.h:32:1:
+ X_POSIX_AIO_MAX = 1 // posix1_lim.h:35:1:
+ X_POSIX_ARG_MAX = 4096 // posix1_lim.h:38:1:
+ X_POSIX_CHILD_MAX = 25 // posix1_lim.h:42:1:
+ X_POSIX_CLOCKRES_MIN = 20000000 // posix1_lim.h:157:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_DELAYTIMER_MAX = 32 // posix1_lim.h:48:1:
+ X_POSIX_HOST_NAME_MAX = 255 // posix1_lim.h:52:1:
+ X_POSIX_LINK_MAX = 8 // posix1_lim.h:55:1:
+ X_POSIX_LOGIN_NAME_MAX = 9 // posix1_lim.h:58:1:
+ X_POSIX_MAX_CANON = 255 // posix1_lim.h:61:1:
+ X_POSIX_MAX_INPUT = 255 // posix1_lim.h:65:1:
+ X_POSIX_MQ_OPEN_MAX = 8 // posix1_lim.h:68:1:
+ X_POSIX_MQ_PRIO_MAX = 32 // posix1_lim.h:71:1:
+ X_POSIX_NAME_MAX = 14 // posix1_lim.h:74:1:
+ X_POSIX_NGROUPS_MAX = 8 // posix1_lim.h:78:1:
+ X_POSIX_OPEN_MAX = 20 // posix1_lim.h:85:1:
+ X_POSIX_PATH_MAX = 256 // posix1_lim.h:97:1:
+ X_POSIX_PIPE_BUF = 512 // posix1_lim.h:100:1:
+ X_POSIX_RE_DUP_MAX = 255 // posix1_lim.h:104:1:
+ X_POSIX_RTSIG_MAX = 8 // posix1_lim.h:107:1:
+ X_POSIX_SEM_NSEMS_MAX = 256 // posix1_lim.h:110:1:
+ X_POSIX_SEM_VALUE_MAX = 32767 // posix1_lim.h:113:1:
+ X_POSIX_SIGQUEUE_MAX = 32 // posix1_lim.h:116:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_POSIX_SSIZE_MAX = 32767 // posix1_lim.h:119:1:
+ X_POSIX_STREAM_MAX = 8 // posix1_lim.h:122:1:
+ X_POSIX_SYMLINK_MAX = 255 // posix1_lim.h:125:1:
+ X_POSIX_SYMLOOP_MAX = 8 // posix1_lim.h:129:1:
+ X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // local_lim.h:67:1:
+ X_POSIX_THREAD_KEYS_MAX = 128 // local_lim.h:62:1:
+ X_POSIX_THREAD_THREADS_MAX = 64 // local_lim.h:72:1:
+ X_POSIX_TIMER_MAX = 32 // posix1_lim.h:132:1:
+ X_POSIX_TTY_NAME_MAX = 9 // posix1_lim.h:135:1:
+ X_POSIX_TZNAME_MAX = 6 // posix1_lim.h:139:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+//
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// This administrivia gets added to the beginning of limits.h
+// if the system has its own version of limits.h.
+
+// We use _GCC_LIMITS_H_ because we want this not to match
+// any macros that the system's limits.h uses for its own purposes.
+
+// Use "..." so that we find syslimits.h only in this same directory.
+// syslimits.h stands for the system's own limits.h file.
+// If we can use it ok unmodified, then we install this text.
+// If fixincludes fixes it, then the fixed version is installed
+// instead of this text.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
+
+// Handle feature test macros at the start of a header.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This header is internal to glibc and should not be included outside
+// of glibc headers. Headers including it must define
+// __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header
+// cannot have multiple include guards because ISO C feature test
+// macros depend on the definition of the macro when an affected
+// header is included, not when the first system header is
+// included.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
+// macro.
+
+// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
+// macro. Most but not all symbols enabled by that macro in TS
+// 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
+// still require that macro in C2X.
+
+// ISO/IEC TS 18661-4:2015 defines the
+// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
+// functions, the symbols from this TS are enabled unconditionally in
+// C2X.
+
+// ISO/IEC TS 18661-3:2015 defines the
+// __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
+
+// Maximum length of any multibyte character in any locale.
+// We define this value here since the gcc header does not define
+// the correct value.
+
+// If we are not using GNU CC we have to define all the symbols ourself.
+// Otherwise use gcc's definitions (see below).
+
+// Get the compiler's limits.h, which defines almost all the ISO constants.
+//
+// We put this #include_next outside the double inclusion check because
+// it should be possible to include this file more than once and still get
+// the definitions from gcc's header.
+
+// The <limits.h> files in some gcc versions don't define LLONG_MIN,
+// LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
+// ages are available.
+
+// The integer width macros are not defined by GCC's <limits.h> before
+// GCC 7, or if _GNU_SOURCE rather than
+// __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature.
+
+// POSIX adds things to <limits.h>.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.9.2 Minimum Values Added to <limits.h>
+//
+// Never include this file directly; use <limits.h> instead.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// These are the standard-mandated minimum values.
+
+// Minimum number of operations in one list I/O call.
+
+// Minimal number of outstanding asynchronous I/O operations.
+
+// Maximum length of arguments to `execve', including environment.
+
+// Maximum simultaneous processes per real user ID.
+
+// Minimal number of timer expiration overruns.
+
+// Maximum length of a host name (not including the terminating null)
+// as returned from the GETHOSTNAME function.
+
+// Maximum link count of a file.
+
+// Maximum length of login name.
+
+// Number of bytes in a terminal canonical input queue.
+
+// Number of bytes for which space will be
+// available in a terminal input queue.
+
+// Maximum number of message queues open for a process.
+
+// Maximum number of supported message priorities.
+
+// Number of bytes in a filename.
+
+// Number of simultaneous supplementary group IDs per process.
+
+// Number of files one process can have open at once.
+
+// Number of bytes in a pathname.
+
+// Number of bytes than can be written atomically to a pipe.
+
+// The number of repeated occurrences of a BRE permitted by the
+// REGEXEC and REGCOMP functions when using the interval notation.
+
+// Minimal number of realtime signals reserved for the application.
+
+// Number of semaphores a process can have.
+
+// Maximal value of a semaphore.
+
+// Number of pending realtime signals.
+
+// Largest value of a `ssize_t'.
+
+// Number of streams a process can have open at once.
+
+// The number of bytes in a symbolic link.
+
+// The number of symbolic links that can be traversed in the
+// resolution of a pathname in the absence of a loop.
+
+// Number of timer for a process.
+
+// Maximum number of characters in a tty name.
+
+// Maximum length of a timezone name (element of `tzname').
+
+// Maximum clock resolution in nanoseconds.
+
+// Get the implementation-specific values for the above.
+// Minimum guaranteed maximum values for system limits. Linux version.
+// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 2.1 of the
+// License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; see the file COPYING.LIB. If
+// not, see <https://www.gnu.org/licenses/>.
+
+// The kernel header pollutes the namespace with the NR_OPEN symbol
+// and defines LINK_MAX although filesystems have different maxima. A
+// similar thing is true for OPEN_MAX: the limit can be changed at
+// runtime and therefore the macro must not be defined. Remove this
+// after including the header if necessary.
+
+// The kernel sources contain a file with all the needed information.
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// Have to remove NR_OPEN?
+// Have to remove LINK_MAX?
+// Have to remove OPEN_MAX?
+// Have to remove ARG_MAX?
+
+// The number of data keys per process.
+// This is the value this implementation supports.
+
+// Controlling the iterations of destructors for thread-specific data.
+// Number of iterations this implementation does.
+
+// The number of threads per process.
+// We have no predefined limit on the number of threads.
+
+// Maximum amount by which a process can descrease its asynchronous I/O
+// priority level.
+
+// Minimum size for a thread. We are free to choose a reasonable value.
+
+// Maximum number of timer expiration overruns.
+
+// Maximum tty name length.
+
+// Maximum login name length. This is arbitrary.
+
+// Maximum host name length.
+
+// Maximum message queue priority level.
+
+// Maximum value the semaphore can have.
+
+// ssize_t is not formally required to be the signed type
+// corresponding to size_t, but it is for all configurations supported
+// by glibc.
+
+// This value is a guaranteed minimum maximum.
+// The current maximum can be got from `sysconf'.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; include <limits.h> instead.
+
+// The maximum `ibase' and `obase' values allowed by the `bc' utility.
+
+// The maximum number of elements allowed in an array by the `bc' utility.
+
+// The maximum `scale' value allowed by the `bc' utility.
+
+// The maximum length of a string constant accepted by the `bc' utility.
+
+// The maximum number of weights that can be assigned to an entry of
+// the LC_COLLATE `order' keyword in the locale definition file.
+
+// The maximum number of expressions that can be nested
+// within parentheses by the `expr' utility.
+
+// The maximum length, in bytes, of an input line.
+
+// The maximum number of repeated occurrences of a regular expression
+// permitted when using the interval notation `\{M,N\}'.
+
+// The maximum number of bytes in a character class name. We have no
+// fixed limit, 2048 is a high number.
+
+// These values are implementation-specific,
+// and may vary within the implementation.
+// Their precise values can be obtained from sysconf.
+
+// This value is defined like this in regex.h.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+//
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Number of bits in a `char'.
+
+// Maximum length of a multibyte character.
+
+// Minimum and maximum values a `signed char' can hold.
+
+// Maximum value an `unsigned char' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `char' can hold.
+
+// Minimum and maximum values a `signed short int' can hold.
+
+// Maximum value an `unsigned short int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed int' can hold.
+
+// Maximum value an `unsigned int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed long int' can hold.
+// (Same as `int').
+
+// Maximum value an `unsigned long int' can hold. (Minimum is 0).
+
+// Minimum and maximum values a `signed long long int' can hold.
+
+// Maximum value an `unsigned long long int' can hold. (Minimum is 0).
+
+// This administrivia gets added to the end of limits.h
+// if the system has its own version of limits.h.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/mem.go b/vendor/modernc.org/libc/mem.go
index 3d50a7b33..bdd14b19c 100644
--- a/vendor/modernc.org/libc/mem.go
+++ b/vendor/modernc.org/libc/mem.go
@@ -21,6 +21,9 @@ var (
// void *malloc(size_t size);
func Xmalloc(t *TLS, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v n=%v, (%v:)", t, n, origin(2))
+ }
if n == 0 {
return 0
}
@@ -40,6 +43,9 @@ func Xmalloc(t *TLS, n types.Size_t) uintptr {
// void *calloc(size_t nmemb, size_t size);
func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v size=%v, (%v:)", t, size, origin(2))
+ }
rq := int(n * size)
if rq == 0 {
return 0
@@ -60,6 +66,9 @@ func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
// void *realloc(void *ptr, size_t size);
func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
+ }
allocMu.Lock()
defer allocMu.Unlock()
@@ -75,6 +84,9 @@ func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
// void free(void *ptr);
func Xfree(t *TLS, p uintptr) {
+ if __ccgo_strace {
+ trc("t=%v p=%v, (%v:)", t, p, origin(2))
+ }
if p == 0 {
return
}
@@ -87,6 +99,10 @@ func Xfree(t *TLS, p uintptr) {
}
func Xmalloc_usable_size(tls *TLS, p uintptr) (r types.Size_t) {
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ defer func() { trc("-> %v", r) }()
+ }
if p == 0 {
return 0
}
diff --git a/vendor/modernc.org/libc/mem_brk.go b/vendor/modernc.org/libc/mem_brk.go
index 00f350435..7b3c2ea59 100644
--- a/vendor/modernc.org/libc/mem_brk.go
+++ b/vendor/modernc.org/libc/mem_brk.go
@@ -32,6 +32,9 @@ var (
// void *malloc(size_t size);
func Xmalloc(t *TLS, n types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v n=%v, (%v:)", t, n, origin(2))
+ }
if n == 0 {
return 0
}
@@ -54,11 +57,17 @@ func Xmalloc(t *TLS, n types.Size_t) uintptr {
// void *calloc(size_t nmemb, size_t size);
func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v size=%v, (%v:)", t, size, origin(2))
+ }
return Xmalloc(t, n*size)
}
// void *realloc(void *ptr, size_t size);
func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
+ }
switch {
case ptr != 0 && size != 0:
p := Xmalloc(t, size)
@@ -74,7 +83,12 @@ func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
}
// void free(void *ptr);
-func Xfree(t *TLS, p uintptr) {}
+
+func Xfree(t *TLS, p uintptr) {
+ if __ccgo_strace {
+ trc("t=%v p=%v, (%v:)", t, p, origin(2))
+ }
+}
func UsableSize(p uintptr) types.Size_t {
return types.Size_t(*(*uintptr)(unsafe.Pointer(p - uintptrSize)))
diff --git a/vendor/modernc.org/libc/memgrind.go b/vendor/modernc.org/libc/memgrind.go
index 70044c070..ead9c49d5 100644
--- a/vendor/modernc.org/libc/memgrind.go
+++ b/vendor/modernc.org/libc/memgrind.go
@@ -74,6 +74,9 @@ func pc2origin(pc uintptr) string {
// void *malloc(size_t size);
func Xmalloc(t *TLS, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v size=%v, (%v:)", t, size, origin(2))
+ }
if size == 0 {
return 0
}
@@ -83,9 +86,9 @@ func Xmalloc(t *TLS, size types.Size_t) uintptr {
defer allocMu.Unlock()
p, err := allocator.UintptrCalloc(int(size))
- if dmesgs {
- dmesg("%v: %v -> %#x, %v", origin(1), size, p, err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v -> %#x, %v", origin(1), size, p, err)
+ // }
if err != nil {
t.setErrno(errno.ENOMEM)
return 0
@@ -110,6 +113,9 @@ func Xmalloc(t *TLS, size types.Size_t) uintptr {
// void *calloc(size_t nmemb, size_t size);
func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v size=%v, (%v:)", t, size, origin(2))
+ }
rq := int(n * size)
if rq == 0 {
return 0
@@ -120,9 +126,9 @@ func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
defer allocMu.Unlock()
p, err := allocator.UintptrCalloc(int(n * size))
- if dmesgs {
- dmesg("%v: %v -> %#x, %v", origin(1), n*size, p, err)
- }
+ // if dmesgs {
+ // dmesg("%v: %v -> %#x, %v", origin(1), n*size, p, err)
+ // }
if err != nil {
t.setErrno(errno.ENOMEM)
return 0
@@ -147,6 +153,9 @@ func Xcalloc(t *TLS, n, size types.Size_t) uintptr {
// void *realloc(void *ptr, size_t size);
func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v ptr=%v size=%v, (%v:)", t, ptr, size, origin(2))
+ }
allocMu.Lock()
defer allocMu.Unlock()
@@ -176,9 +185,9 @@ func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
}
p, err := allocator.UintptrRealloc(ptr, int(size))
- if dmesgs {
- dmesg("%v: %#x, %v -> %#x, %v", origin(1), ptr, size, p, err)
- }
+ // if dmesgs {
+ // dmesg("%v: %#x, %v -> %#x, %v", origin(1), ptr, size, p, err)
+ // }
if err != nil {
t.setErrno(errno.ENOMEM)
return 0
@@ -198,13 +207,16 @@ func Xrealloc(t *TLS, ptr uintptr, size types.Size_t) uintptr {
// void free(void *ptr);
func Xfree(t *TLS, p uintptr) {
+ if __ccgo_strace {
+ trc("t=%v p=%v, (%v:)", t, p, origin(2))
+ }
if p == 0 {
return
}
- if dmesgs {
- dmesg("%v: %#x", origin(1), p)
- }
+ // if dmesgs {
+ // dmesg("%v: %#x", origin(1), p)
+ // }
allocMu.Lock()
diff --git a/vendor/modernc.org/libc/musl_darwin_amd64.go b/vendor/modernc.org/libc/musl_darwin_amd64.go
index 350e8defd..e0333fa3a 100644
--- a/vendor/modernc.org/libc/musl_darwin_amd64.go
+++ b/vendor/modernc.org/libc/musl_darwin_amd64.go
@@ -459,6 +459,9 @@ type _RuneLocale = struct {
} /* table.c:1616:3 */
func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
return func() int32 {
if Xisascii(tls, _c) != 0 {
@@ -470,6 +473,9 @@ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
}
func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
if _c < 0 || _c >= int32(1)<<8 {
return 0
@@ -479,6 +485,9 @@ func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
}
func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
var _x uint32
if _c == 0 {
@@ -497,90 +506,156 @@ func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
}
func Xisalnum(tls *TLS, _c int32) int32 { /* table.c:1718:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000100|0x00000400))
}
func Xisalpha(tls *TLS, _c int32) int32 { /* table.c:1724:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000100))
}
func Xisblank(tls *TLS, _c int32) int32 { /* table.c:1730:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00020000))
}
func Xiscntrl(tls *TLS, _c int32) int32 { /* table.c:1736:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000200))
}
func Xisdigit(tls *TLS, _c int32) int32 { /* table.c:1743:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__isctype(tls, _c, uint64(0x00000400))
}
func Xisgraph(tls *TLS, _c int32) int32 { /* table.c:1749:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000800))
}
func Xislower(tls *TLS, _c int32) int32 { /* table.c:1755:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00001000))
}
func Xisprint(tls *TLS, _c int32) int32 { /* table.c:1761:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00040000))
}
func Xispunct(tls *TLS, _c int32) int32 { /* table.c:1767:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00002000))
}
func Xisupper(tls *TLS, _c int32) int32 { /* table.c:1779:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00008000))
}
func Xisxdigit(tls *TLS, _c int32) int32 { /* table.c:1786:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__isctype(tls, _c, uint64(0x00010000))
}
func Xtoascii(tls *TLS, _c int32) int32 { /* table.c:1792:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return _c & 0x7F
}
func Xdigittoint(tls *TLS, _c int32) int32 { /* table.c:1811:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__maskrune(tls, _c, uint64(0x0F))
}
func Xishexnumber(tls *TLS, _c int32) int32 { /* table.c:1817:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00010000))
}
func Xisideogram(tls *TLS, _c int32) int32 { /* table.c:1823:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00080000))
}
func Xisnumber(tls *TLS, _c int32) int32 { /* table.c:1829:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000400))
}
func Xisphonogram(tls *TLS, _c int32) int32 { /* table.c:1835:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00200000))
}
func Xisrune(tls *TLS, _c int32) int32 { /* table.c:1841:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0xFFFFFFF0))
}
func Xisspecial(tls *TLS, _c int32) int32 { /* table.c:1847:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00100000))
}
func X__maskrune(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1871:2: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f))
}
func X__toupper(tls *TLS, c int32) int32 { /* table.c:1876:20: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Xtoupper(tls, c)
}
func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Xtolower(tls, c)
}
@@ -670,6 +745,9 @@ type gid_t = uint32 /* alltypes.h:250:18 */
type useconds_t = uint32 /* alltypes.h:260:18 */
func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2))
+ }
var i size_t
var newenv uintptr
var tmp uintptr
@@ -750,6 +828,9 @@ oom:
var _soldenv uintptr /* putenv.c:22:14: */
func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1)
if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) {
return Xunsetenv(tls, s)
@@ -758,6 +839,9 @@ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
}
func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */
+ if __ccgo_strace {
+ trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2))
+ }
//TODO for (size_t i=0; i < env_alloced_n; i++)
var i size_t = uint64(0)
for ; i < _senv_alloced_n; i++ {
@@ -784,6 +868,9 @@ var _senv_alloced uintptr /* setenv.c:7:14: */
var _senv_alloced_n size_t /* setenv.c:8:16: */
func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */
+ if __ccgo_strace {
+ trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2))
+ }
var s uintptr
var l1 size_t
var l2 size_t
@@ -808,6 +895,9 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /*
}
func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1)
if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -1549,6 +1639,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1726,6 +1819,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -2031,6 +2127,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -2042,6 +2141,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -2103,10 +2205,16 @@ type lconv = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2131,6 +2239,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2159,28 +2270,46 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2210,6 +2339,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2246,6 +2378,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2558,6 +2693,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -2693,6 +2831,9 @@ type __ptcb = struct {
} /* pthread.h:206:1 */
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2897,6 +3038,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2923,6 +3067,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -3008,10 +3155,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -3038,6 +3191,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3424,6 +3580,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -3524,10 +3683,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -3579,6 +3744,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3653,6 +3821,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3750,6 +3921,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -4072,6 +4246,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -4238,6 +4415,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4371,10 +4551,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4394,6 +4580,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4402,6 +4591,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4416,6 +4608,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -4458,14 +4653,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4487,26 +4691,44 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
@@ -4520,6 +4742,9 @@ func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strto
// from SUS and have nothing to do with the host system.
func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
@@ -4540,6 +4765,9 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: *
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -4549,6 +4777,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -4566,6 +4797,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -4637,6 +4871,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -4659,10 +4896,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
@@ -4674,6 +4917,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -4682,6 +4928,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -4705,6 +4954,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
diff --git a/vendor/modernc.org/libc/musl_darwin_arm64.go b/vendor/modernc.org/libc/musl_darwin_arm64.go
index e6fc642a8..65b8c5363 100644
--- a/vendor/modernc.org/libc/musl_darwin_arm64.go
+++ b/vendor/modernc.org/libc/musl_darwin_arm64.go
@@ -459,6 +459,9 @@ type _RuneLocale = struct {
} /* table.c:1616:3 */
func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
return func() int32 {
if Xisascii(tls, _c) != 0 {
@@ -470,6 +473,9 @@ func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
}
func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
if _c < 0 || _c >= int32(1)<<8 {
return 0
@@ -479,6 +485,9 @@ func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
}
func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
var _x uint32
if _c == 0 {
@@ -497,90 +506,156 @@ func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
}
func Xisalnum(tls *TLS, _c int32) int32 { /* table.c:1718:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000100|0x00000400))
}
func Xisalpha(tls *TLS, _c int32) int32 { /* table.c:1724:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000100))
}
func Xisblank(tls *TLS, _c int32) int32 { /* table.c:1730:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00020000))
}
func Xiscntrl(tls *TLS, _c int32) int32 { /* table.c:1736:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000200))
}
func Xisdigit(tls *TLS, _c int32) int32 { /* table.c:1743:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__isctype(tls, _c, uint64(0x00000400))
}
func Xisgraph(tls *TLS, _c int32) int32 { /* table.c:1749:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000800))
}
func Xislower(tls *TLS, _c int32) int32 { /* table.c:1755:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00001000))
}
func Xisprint(tls *TLS, _c int32) int32 { /* table.c:1761:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00040000))
}
func Xispunct(tls *TLS, _c int32) int32 { /* table.c:1767:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00002000))
}
func Xisupper(tls *TLS, _c int32) int32 { /* table.c:1779:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00008000))
}
func Xisxdigit(tls *TLS, _c int32) int32 { /* table.c:1786:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__isctype(tls, _c, uint64(0x00010000))
}
func Xtoascii(tls *TLS, _c int32) int32 { /* table.c:1792:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return _c & 0x7F
}
func Xdigittoint(tls *TLS, _c int32) int32 { /* table.c:1811:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__maskrune(tls, _c, uint64(0x0F))
}
func Xishexnumber(tls *TLS, _c int32) int32 { /* table.c:1817:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00010000))
}
func Xisideogram(tls *TLS, _c int32) int32 { /* table.c:1823:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00080000))
}
func Xisnumber(tls *TLS, _c int32) int32 { /* table.c:1829:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00000400))
}
func Xisphonogram(tls *TLS, _c int32) int32 { /* table.c:1835:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00200000))
}
func Xisrune(tls *TLS, _c int32) int32 { /* table.c:1841:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0xFFFFFFF0))
}
func Xisspecial(tls *TLS, _c int32) int32 { /* table.c:1847:1: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return X__istype(tls, _c, uint64(0x00100000))
}
func X__maskrune(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1871:2: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v _f=%v, (%v:)", tls, _c, _f, origin(2))
+ }
return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f))
}
func X__toupper(tls *TLS, c int32) int32 { /* table.c:1876:20: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Xtoupper(tls, c)
}
func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Xtolower(tls, c)
}
@@ -670,6 +745,9 @@ type gid_t = uint32 /* alltypes.h:258:18 */
type useconds_t = uint32 /* alltypes.h:268:18 */
func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2))
+ }
var i size_t
var newenv uintptr
var tmp uintptr
@@ -750,6 +828,9 @@ oom:
var _soldenv uintptr /* putenv.c:22:14: */
func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1)
if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) {
return Xunsetenv(tls, s)
@@ -758,6 +839,9 @@ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
}
func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */
+ if __ccgo_strace {
+ trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2))
+ }
//TODO for (size_t i=0; i < env_alloced_n; i++)
var i size_t = uint64(0)
for ; i < _senv_alloced_n; i++ {
@@ -784,6 +868,9 @@ var _senv_alloced uintptr /* setenv.c:7:14: */
var _senv_alloced_n size_t /* setenv.c:8:16: */
func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */
+ if __ccgo_strace {
+ trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2))
+ }
var s uintptr
var l1 size_t
var l2 size_t
@@ -808,6 +895,9 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /*
}
func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1)
if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -1549,6 +1639,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1726,6 +1819,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -2031,6 +2127,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -2042,6 +2141,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -2103,10 +2205,16 @@ type lconv = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2131,6 +2239,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2159,28 +2270,46 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2210,6 +2339,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2246,6 +2378,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2558,6 +2693,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -2693,6 +2831,9 @@ type __ptcb = struct {
} /* pthread.h:206:1 */
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2897,6 +3038,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2923,6 +3067,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -3008,10 +3155,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -3038,6 +3191,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3424,6 +3580,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -3524,10 +3683,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -3579,6 +3744,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3653,6 +3821,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3750,6 +3921,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -4072,6 +4246,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -4238,6 +4415,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4371,10 +4551,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4394,6 +4580,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4402,6 +4591,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4416,6 +4608,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -4458,14 +4653,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4487,26 +4691,44 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
@@ -4520,6 +4742,9 @@ func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strto
// from SUS and have nothing to do with the host system.
func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
@@ -4540,6 +4765,9 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: *
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -4549,6 +4777,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -4566,6 +4797,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -4637,6 +4871,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -4659,10 +4896,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
@@ -4674,6 +4917,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -4682,6 +4928,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -4705,6 +4954,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
diff --git a/vendor/modernc.org/libc/musl_freebsd_386.go b/vendor/modernc.org/libc/musl_freebsd_386.go
index a7fc31808..8bd94c063 100644
--- a/vendor/modernc.org/libc/musl_freebsd_386.go
+++ b/vendor/modernc.org/libc/musl_freebsd_386.go
@@ -3319,6 +3319,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:366:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -3333,58 +3336,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -3394,6 +3439,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -4113,6 +4161,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -4290,6 +4341,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -4595,6 +4649,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -4606,6 +4663,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -4632,20 +4692,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4675,6 +4747,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4711,6 +4786,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -5029,6 +5107,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -5052,7 +5133,7 @@ __3:
//TODO else UNLOCK(b->lock);
}
-type time_t = int64 /* alltypes.h:108:16 */
+type time_t = int32 /* alltypes.h:108:16 */
type clockid_t = int32 /* alltypes.h:237:13 */
@@ -5139,6 +5220,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -5338,6 +5422,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5364,10 +5451,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5394,6 +5487,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -5772,10 +5868,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -5827,6 +5929,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -5901,6 +6006,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -5998,6 +6106,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -6317,6 +6428,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -6483,6 +6597,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -6608,6 +6725,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -6627,6 +6747,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -6635,6 +6758,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -6649,6 +6775,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -6691,14 +6820,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6720,30 +6858,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -6753,6 +6912,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -6761,6 +6923,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_freebsd_amd64.go b/vendor/modernc.org/libc/musl_freebsd_amd64.go
index ae1a70aff..a301e3a36 100644
--- a/vendor/modernc.org/libc/musl_freebsd_amd64.go
+++ b/vendor/modernc.org/libc/musl_freebsd_amd64.go
@@ -3323,6 +3323,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -3337,58 +3340,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -3398,6 +3443,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -4119,6 +4167,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -4296,6 +4347,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -4601,6 +4655,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -4612,6 +4669,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -4638,20 +4698,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4681,6 +4753,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4717,6 +4792,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -5048,6 +5126,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -5185,6 +5266,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -5389,6 +5473,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5415,10 +5502,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5445,6 +5538,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -5833,10 +5929,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -5888,6 +5990,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -5962,6 +6067,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -6059,6 +6167,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -6381,6 +6492,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -6547,6 +6661,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -6672,6 +6789,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -6691,6 +6811,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -6699,6 +6822,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -6713,6 +6839,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6755,14 +6884,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6784,30 +6922,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6817,6 +6976,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6825,6 +6987,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_freebsd_arm.go b/vendor/modernc.org/libc/musl_freebsd_arm.go
index d444461da..cb4f02d9a 100644
--- a/vendor/modernc.org/libc/musl_freebsd_arm.go
+++ b/vendor/modernc.org/libc/musl_freebsd_arm.go
@@ -3319,6 +3319,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:336:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -3333,58 +3336,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -3394,6 +3439,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -4115,6 +4163,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -4292,6 +4343,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -4597,6 +4651,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -4608,6 +4665,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -4634,20 +4694,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4677,6 +4749,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4713,6 +4788,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -5031,6 +5109,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -5141,6 +5222,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -5340,6 +5424,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5366,10 +5453,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5396,6 +5489,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -5774,10 +5870,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -5829,6 +5931,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -5903,6 +6008,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -6000,6 +6108,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -6321,6 +6432,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -6487,6 +6601,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -6612,6 +6729,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -6631,6 +6751,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -6639,6 +6762,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -6653,6 +6779,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -6695,14 +6824,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6724,30 +6862,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -6757,6 +6916,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -6765,6 +6927,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_freebsd_arm64.go b/vendor/modernc.org/libc/musl_freebsd_arm64.go
index ae1a70aff..a301e3a36 100644
--- a/vendor/modernc.org/libc/musl_freebsd_arm64.go
+++ b/vendor/modernc.org/libc/musl_freebsd_arm64.go
@@ -3323,6 +3323,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -3337,58 +3340,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -3398,6 +3443,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -4119,6 +4167,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -4296,6 +4347,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -4601,6 +4655,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -4612,6 +4669,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -4638,20 +4698,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4681,6 +4753,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4717,6 +4792,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -5048,6 +5126,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -5185,6 +5266,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -5389,6 +5473,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5415,10 +5502,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5445,6 +5538,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -5833,10 +5929,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -5888,6 +5990,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -5962,6 +6067,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -6059,6 +6167,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -6381,6 +6492,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -6547,6 +6661,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -6672,6 +6789,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -6691,6 +6811,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -6699,6 +6822,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -6713,6 +6839,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6755,14 +6884,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6784,30 +6922,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6817,6 +6976,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6825,6 +6987,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_illumos_amd64.go b/vendor/modernc.org/libc/musl_illumos_amd64.go
new file mode 100644
index 000000000..6a70aeb30
--- /dev/null
+++ b/vendor/modernc.org/libc/musl_illumos_amd64.go
@@ -0,0 +1,7210 @@
+// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_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 src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.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/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.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/gethostbyname_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/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.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 src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.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
+)
+
+const ( /* pthread_impl.h:58:1: */
+ DT_EXITING = 0
+ DT_JOINABLE = 1
+ DT_DETACHED = 2
+)
+
+type ptrdiff_t = int64 /* <builtin>:3:26 */
+
+type size_t = uint64 /* <builtin>:9:23 */
+
+type wchar_t = int32 /* <builtin>:15:24 */
+
+type uint16_t = uint16 /* alltypes.h:126:25 */
+
+type uint32_t = uint32 /* alltypes.h:131:25 */
+
+type uint64_t = uint64 /* alltypes.h:136:25 */
+
+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
+}
+
+var table = [384]uint16{
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536),
+ uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+} /* __ctype_b_loc.c:9:29 */
+
+var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
+
+func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&ptable))
+}
+
+func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
+ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
+}
+
+type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */
+
+type locale_t = uintptr /* alltypes.h:343:32 */
+
+func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisalnum(tls, c)
+}
+
+func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisalpha(tls, c)
+}
+
+func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('0') < uint32(10))
+}
+
+func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisdigit(tls, c)
+}
+
+func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('a') < uint32(26))
+}
+
+func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xislower(tls, c)
+}
+
+func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
+}
+
+func X__builtin_isprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
+}
+
+func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisprint(tls, c)
+}
+
+func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('A') < uint32(26))
+}
+
+func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisupper(tls, c)
+}
+
+func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisxdigit(tls, c)
+}
+
+type off_t = int64 /* alltypes.h:162:16 */
+
+type ino_t = uint64 /* alltypes.h:167:25 */
+
+type dirent = struct {
+ d_ino ino_t
+ d_off off_t
+ d_reclen uint16
+ d_type uint8
+ d_name [256]int8
+ _ [5]byte
+} /* dirent.h:5:1 */
+
+type __dirstream = struct {
+ tell off_t
+ fd int32
+ buf_pos int32
+ buf_end int32
+ lock [1]int32
+ buf [2048]int8
+} /* dirent.h:20:9 */
+
+type DIR = __dirstream /* dirent.h:20:28 */
+
+type ssize_t = int64 /* alltypes.h:65:15 */
+
+type intptr_t = int64 /* alltypes.h:70:15 */
+
+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 useconds_t = uint32 /* alltypes.h:260:18 */
+
+type div_t = struct {
+ quot int32
+ rem int32
+} /* stdlib.h:62:35 */
+type ldiv_t = struct {
+ quot int64
+ rem int64
+} /* stdlib.h:63:36 */
+type lldiv_t = struct {
+ quot int64
+ rem int64
+} /* stdlib.h:64:41 */
+
+func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
+ var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
+ Xfree(tls, dir)
+ return ret
+}
+
+type mode_t = uint32 /* alltypes.h:152:18 */
+
+type iovec = struct {
+ iov_base uintptr
+ iov_len size_t
+} /* alltypes.h:355:1 */
+
+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
+} /* fcntl.h:24:1 */
+
+type file_handle = struct {
+ _ [0]uint32
+ handle_bytes uint32
+ handle_type int32
+} /* fcntl.h:167:1 */
+
+type f_owner_ex = struct {
+ __type int32
+ pid pid_t
+} /* fcntl.h:172:1 */
+
+type syscall_arg_t = int64 /* syscall.h:22:14 */
+
+func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
+ panic(todo(""))
+ // var fd int32
+ // var dir uintptr
+ //
+ // if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 {
+ // return uintptr(0)
+ // }
+ // if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) {
+ // X__syscall1(tls, int64(3), int64(fd))
+ // return uintptr(0)
+ // }
+ // (*DIR)(unsafe.Pointer(dir)).fd = fd
+ // return dir
+}
+
+type max_align_t = struct {
+ __ll int64
+ __ld float64
+} /* alltypes.h:41:54 */
+
+type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
+
+func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
+ panic(todo(""))
+ // var de uintptr
+ //
+ // if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
+ // var len int32 = int32(X__syscall3(tls, int64(217), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]int8{}))))
+ // if len <= 0 {
+ // if len < 0 && len != -2 {
+ // *(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len
+ // }
+ // return uintptr(0)
+ // }
+ // (*DIR)(unsafe.Pointer(dir)).buf_end = len
+ // (*DIR)(unsafe.Pointer(dir)).buf_pos = 0
+ // }
+ // de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos)
+ // *(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen)
+ // (*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off
+ // return de
+}
+
+type uintptr_t = uint64 /* alltypes.h:55:24 */
+
+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 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 _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
+} /* 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 {
+ _ [0]uint64
+ __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 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 float64;} at bp, 8
+
+ *(*float64)(unsafe.Pointer(bp)) = __f
+ return *(*uint64)(unsafe.Pointer(bp))
+}
+
+type __pthread = struct {
+ self uintptr
+ dtv uintptr
+ prev uintptr
+ next uintptr
+ sysinfo uintptr_t
+ canary uintptr_t
+ canary2 uintptr_t
+ tid int32
+ errno_val int32
+ detach_state int32
+ cancel int32
+ canceldisable uint8
+ cancelasync uint8
+ tsd_used uint8 /* unsigned char tsd_used: 1, unsigned char dlerror_flag: 1 */
+ _ [5]byte
+ map_base uintptr
+ map_size size_t
+ stack uintptr
+ stack_size size_t
+ guard_size size_t
+ result uintptr
+ cancelbuf uintptr
+ tsd uintptr
+ robust_list struct {
+ head uintptr
+ off int64
+ pending uintptr
+ }
+ timer_id int32
+ _ [4]byte
+ locale locale_t
+ killlock [1]int32
+ _ [4]byte
+ dlerror_buf uintptr
+ stdio_locks uintptr
+ canary_at_end uintptr_t
+ dtv_copy uintptr
+} /* alltypes.h:273:9 */
+
+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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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))))
+ }
+ 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--
+ } else {
+ }
+ }
+ }
+ if uint32(c-'0') >= 10 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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))))
+ }
+ 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))))
+ }
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ gotdig = 1
+ }
+ 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))))
+ }
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ gotdig = 1
+ }
+
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if pok != 0 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if gotrad != 0 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ } else {
+ X__shlim(tls, f, int64(0))
+ return float64(0)
+ }
+ e2 = int64(0)
+ }
+ } else {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }())) != 0 {
+ }
+
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if pok != 0 {
+ for ; i > uint64(3); i-- {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }()
+ }
+ }
+ }
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() != '(' {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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))))
+ }
+ 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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--
+ } else {
+ }
+ c = '0'
+ }
+
+ return decfloat(tls, f, c, bits, emin, sign, pok)
+}
+
+// Lookup table for digit values. -1==255>=36 -> invalid
+var table1 = [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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
+ var val uintptr
+ var c int32
+ var neg int32
+ var x uint32
+ var y uint64
+ var bs int32
+ val = uintptr(unsafe.Pointer(&table1)) + 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }()
+ if !(c|32 == 'x') {
+ 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))))
+ }
+ 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--
+ } else {
+ }
+ if !(pok != 0) {
+ goto __10
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
+ (*FILE)(unsafe.Pointer(f)).shlim = lim
+ (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 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)
+ } else {
+ (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ }
+}
+
+func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ 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)
+ 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)
+ } else {
+ (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ }
+ (*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)
+ }
+ 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
+} /* locale.h:24:1 */
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// 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 */
+
+func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&posix_lconv))
+}
+
+func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) {
+ *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x
+ return r
+ }()
+ var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff))
+ if !(e != 0) {
+ if *(*uint64_t)(unsafe.Pointer(bp))<<1 != 0 {
+ return 3
+ }
+ return 2
+ }
+ if e == 0x7ff {
+ if *(*uint64_t)(unsafe.Pointer(bp))<<12 != 0 {
+ return 0
+ }
+ return 1
+ }
+ return 4
+}
+
+func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) {
+ *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x
+ return r
+ }()
+ var e int32 = int32(*(*uint32_t)(unsafe.Pointer(bp)) >> 23 & uint32_t(0xff))
+ if !(e != 0) {
+ if *(*uint32_t)(unsafe.Pointer(bp))<<1 != 0 {
+ return 3
+ }
+ return 2
+ }
+ if e == 0xff {
+ if *(*uint32_t)(unsafe.Pointer(bp))<<9 != 0 {
+ return 0
+ }
+ return 1
+ }
+ return 4
+}
+
+func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ return X__fpclassify(tls, x)
+}
+
+func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
+ return Xcopysign(tls, x, y)
+}
+
+func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ return Xfabs(tls, x)
+}
+
+func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
+ return Xfmod(tls, x, y)
+}
+
+func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
+ return X__builtin_nanf(tls, ts+13)
+}
+
+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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f 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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var u struct {f 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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
+ return Xscalbn(tls, x, n)
+}
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// POSIX/SUS requirements follow. These numbers come directly
+// from SUS and have nothing to do with the host system.
+
+type __locale_map = struct {
+ __map uintptr
+ map_size size_t
+ name [24]int8
+ next uintptr
+} /* alltypes.h:343:9 */
+
+type tls_module = struct {
+ next uintptr
+ image uintptr
+ len size_t
+ size size_t
+ align size_t
+ offset size_t
+} /* libc.h:14:1 */
+
+type __libc = struct {
+ can_do_threads int8
+ threaded int8
+ secure int8
+ need_locks int8
+ threads_minus_1 int32
+ auxv uintptr
+ tls_head uintptr
+ tls_size size_t
+ tls_align size_t
+ tls_cnt size_t
+ page_size size_t
+ global_locale struct{ cat [6]uintptr }
+} /* libc.h:20:1 */
+
+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
+} /* 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{ __attr uint32 } /* alltypes.h:294:37 */
+
+type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */
+
+type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */
+
+type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */
+
+type __sigset_t = struct{ __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
+ }
+} /* alltypes.h:372:147 */
+
+type pthread_mutex_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [10]int32
+ }
+} /* alltypes.h:377:157 */
+
+type pthread_cond_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [12]int32
+ }
+} /* alltypes.h:387:112 */
+
+type pthread_rwlock_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [14]int32
+ }
+} /* alltypes.h:397:139 */
+
+type pthread_barrier_t = struct {
+ __u struct {
+ _ [0]uint64
+ __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
+} /* sched.h:19:1 */
+
+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
+} /* time.h:38:1 */
+
+type itimerspec = struct {
+ it_interval struct {
+ tv_sec time_t
+ tv_nsec int64
+ }
+ it_value struct {
+ tv_sec time_t
+ tv_nsec int64
+ }
+} /* time.h:80:1 */
+
+type sigevent = struct {
+ sigev_value struct {
+ _ [0]uint64
+ sival_int int32
+ _ [4]byte
+ }
+ sigev_signo int32
+ sigev_notify int32
+ sigev_notify_function uintptr
+ sigev_notify_attributes uintptr
+ __pad [32]int8
+} /* time.h:107:1 */
+
+type __ptcb = struct {
+ __f uintptr
+ __x uintptr
+ __next uintptr
+} /* alltypes.h:273:9 */
+
+type sigaltstack = struct {
+ ss_sp uintptr
+ ss_flags int32
+ _ [4]byte
+ ss_size size_t
+} /* signal.h:44:9 */
+
+type stack_t = sigaltstack /* signal.h:44:28 */
+
+type greg_t = int64 /* signal.h:59:19 */
+type gregset_t = [23]int64 /* signal.h:59:27 */
+type _fpstate = struct {
+ cwd uint16
+ swd uint16
+ ftw uint16
+ fop uint16
+ rip uint64
+ rdp uint64
+ mxcsr uint32
+ mxcr_mask uint32
+ _st [8]struct {
+ significand [4]uint16
+ exponent uint16
+ padding [3]uint16
+ }
+ _xmm [16]struct{ element [4]uint32 }
+ padding [24]uint32
+} /* signal.h:60:9 */
+
+type fpregset_t = uintptr /* signal.h:71:3 */
+type sigcontext = struct {
+ r8 uint64
+ r9 uint64
+ r10 uint64
+ r11 uint64
+ r12 uint64
+ r13 uint64
+ r14 uint64
+ r15 uint64
+ rdi uint64
+ rsi uint64
+ rbp uint64
+ rbx uint64
+ rdx uint64
+ rax uint64
+ rcx uint64
+ rsp uint64
+ rip uint64
+ eflags uint64
+ cs uint16
+ gs uint16
+ fs uint16
+ __pad0 uint16
+ err uint64
+ trapno uint64
+ oldmask uint64
+ cr2 uint64
+ fpstate uintptr
+ __reserved1 [8]uint64
+} /* signal.h:72:1 */
+
+type mcontext_t = struct {
+ gregs gregset_t
+ fpregs fpregset_t
+ __reserved1 [8]uint64
+} /* signal.h:84:3 */
+
+type __ucontext = struct {
+ uc_flags uint64
+ uc_link uintptr
+ uc_stack stack_t
+ uc_mcontext mcontext_t
+ uc_sigmask sigset_t
+ __fpregs_mem [64]uint64
+} /* signal.h:97:9 */
+
+type ucontext_t = __ucontext /* signal.h:104:3 */
+
+type sigval = struct {
+ _ [0]uint64
+ sival_int int32
+ _ [4]byte
+} /* time.h:107:1 */
+
+type siginfo_t = struct {
+ si_signo int32
+ si_errno int32
+ si_code int32
+ _ [4]byte
+ __si_fields struct {
+ _ [0]uint64
+ __pad [112]int8
+ }
+} /* signal.h:145:3 */
+
+type sigaction = struct {
+ __sa_handler struct{ sa_handler uintptr }
+ sa_mask sigset_t
+ sa_flags int32
+ _ [4]byte
+ sa_restorer uintptr
+} /* signal.h:167:1 */
+
+type sig_t = uintptr /* signal.h:251:14 */
+
+type sig_atomic_t = int32 /* signal.h:269:13 */
+
+func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */
+ panic(`arch/x86_64/atomic_arch.h:4:2: assembler statements not supported`)
+ return t
+}
+
+func a_swap(tls *TLS, p uintptr, v int32) int32 { /* atomic_arch.h:20:19: */
+ panic(`arch/x86_64/atomic_arch.h:22:2: assembler statements not supported`)
+ return v
+}
+
+func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:46:20: */
+ panic(`arch/x86_64/atomic_arch.h:48:2: assembler statements not supported`)
+}
+
+func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic_arch.h:62:20: */
+ panic(`arch/x86_64/atomic_arch.h:64:2: assembler statements not supported`)
+}
+
+func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:112:19: */
+ panic(`arch/x86_64/atomic_arch.h:114:2: assembler statements not supported`)
+ return int32(x)
+}
+
+func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic.h:256:19: */
+ return int32(_sdebruijn328[x&-x*uint32_t(0x076be629)>>27])
+}
+
+var _sdebruijn328 = [32]int8{
+ int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13),
+ int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14),
+} /* atomic.h:261:20 */
+
+type __timer = struct {
+ timerid int32
+ _ [4]byte
+ thread pthread_t
+} /* pthread_impl.h:64:1 */
+
+func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
+ var self uintptr
+ panic(`arch/x86_64/pthread_arch.h:4:2: assembler statements not supported`)
+ return self
+}
+
+func __wake(tls *TLS, addr uintptr, cnt int32, priv int32) { /* pthread_impl.h:155:20: */
+ panic(todo(""))
+ // if priv != 0 {
+ // priv = 128
+ // }
+ //
+ // if cnt < 0 {
+ // cnt = 0x7fffffff
+ // }
+ //
+ // _ = Bool32(X__syscall3(tls, int64(202), int64(addr), int64(1|priv), int64(cnt)) != int64(-38) || X__syscall3(tls, int64(202), int64(addr), int64(1), int64(cnt)) != 0)
+}
+
+func __futexwait(tls *TLS, addr uintptr, val int32, priv int32) { /* pthread_impl.h:162:20: */
+ panic(todo(""))
+ // if priv != 0 {
+ // priv = 128
+ // }
+ //
+ // _ = Bool32(X__syscall4(tls, int64(202), int64(addr), int64(0|priv), int64(val), int64(0)) != int64(-38) || X__syscall4(tls, int64(202), int64(addr), int64(0), int64(val), int64(0)) != 0)
+}
+
+var X__fsmu8 = [51]uint32_t{
+ func() uint32 {
+ if 0x2 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x2)
+ }(), func() uint32 {
+ if 0x3 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x3)
+ }(), func() uint32 {
+ if 0x4 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x4)
+ }(), func() uint32 {
+ if 0x5 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x5)
+ }(), func() uint32 {
+ if 0x6 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x6)
+ }(), func() uint32 {
+ if 0x7 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x7)
+ }(),
+ func() uint32 {
+ if 0x8 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x8)
+ }(), func() uint32 {
+ if 0x9 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x9)
+ }(), func() uint32 {
+ if 0xa < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xa)
+ }(), func() uint32 {
+ if 0xb < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xb)
+ }(), func() uint32 {
+ if 0xc < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xc)
+ }(), func() uint32 {
+ if 0xd < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xd)
+ }(), func() uint32 {
+ if 0xe < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xe)
+ }(), func() uint32 {
+ if 0xf < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xf)
+ }(),
+ func() uint32 {
+ if 0x0+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x0+16)
+ }(), func() uint32 {
+ if 0x1+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x1+16)
+ }(), func() uint32 {
+ if 0x2+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x2+16)
+ }(), func() uint32 {
+ if 0x3+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x3+16)
+ }(), func() uint32 {
+ if 0x4+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x4+16)
+ }(), func() uint32 {
+ if 0x5+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x5+16)
+ }(), func() uint32 {
+ if 0x6+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x6+16)
+ }(), func() uint32 {
+ if 0x7+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x7+16)
+ }(),
+ func() uint32 {
+ if 0x8+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x8+16)
+ }(), func() uint32 {
+ if 0x9+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x9+16)
+ }(), func() uint32 {
+ if 0xa+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xa+16)
+ }(), func() uint32 {
+ if 0xb+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xb+16)
+ }(), func() uint32 {
+ if 0xc+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xc+16)
+ }(), func() uint32 {
+ if 0xd+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xd+16)
+ }(), func() uint32 {
+ if 0xe+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xe+16)
+ }(), func() uint32 {
+ if 0xf+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xf+16)
+ }(),
+ func() uint32 {
+ if 0x0 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x0 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x0), func() uint32 {
+ if 0x1 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x1 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x1), func() uint32 {
+ if 0x2 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x2 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x2), func() uint32 {
+ if 0x3 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x3 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x3), func() uint32 {
+ if 0x4 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x4 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x4), func() uint32 {
+ if 0x5 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x5 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x5), func() uint32 {
+ if 0x6 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x6 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x6), func() uint32 {
+ if 0x7 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x7 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x7),
+ func() uint32 {
+ if 0x8 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x8 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x8), func() uint32 {
+ if 0x9 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x9 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x9), func() uint32 {
+ if 0xa == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xa == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xa), func() uint32 {
+ if 0xb == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xb == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xb), func() uint32 {
+ if 0xc == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xc == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xc), func() uint32 {
+ if 0xd == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xd == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xd), func() uint32 {
+ if 0xe == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xe == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xe), func() uint32 {
+ if 0xf == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xf == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xf),
+ func() uint32 {
+ if 0x0 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x0 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x0 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x0), func() uint32 {
+ if 0x1 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x1 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x1 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x1), func() uint32 {
+ if 0x2 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x2 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x2 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x2), func() uint32 {
+ if 0x3 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x3 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x3 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x3), func() uint32 {
+ if 0x4 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x4 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x4 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x4),
+} /* internal.c:18:16 */
+
+type wint_t = uint32 /* alltypes.h:198:18 */
+
+type wctype_t = uint64 /* alltypes.h:203:23 */
+
+type __mbstate_t = struct {
+ __opaque1 uint32
+ __opaque2 uint32
+} /* alltypes.h:337:9 */
+
+type mbstate_t = __mbstate_t /* alltypes.h:337:63 */
+
+func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var c uint32
+ var s uintptr
+ var N uint32
+ // var dummy wchar_t at bp, 4
+ s = src
+ N = uint32(n)
+
+ if !!(st != 0) {
+ goto __1
+ }
+ st = uintptr(unsafe.Pointer(&_sinternal_state))
+__1:
+ ;
+ c = *(*uint32)(unsafe.Pointer(st))
+
+ if !!(s != 0) {
+ goto __2
+ }
+ if !(c != 0) {
+ goto __4
+ }
+ goto ilseq
+__4:
+ ;
+ return uint64(0)
+ goto __3
+__2:
+ if !!(wc != 0) {
+ goto __5
+ }
+ wc = bp /* &dummy */
+__5:
+ ;
+__3:
+ ;
+
+ if !!(n != 0) {
+ goto __6
+ }
+ return Uint64FromInt32(-2)
+__6:
+ ;
+ if !!(c != 0) {
+ goto __7
+ }
+ if !(int32(*(*uint8)(unsafe.Pointer(s))) < 0x80) {
+ goto __8
+ }
+ return BoolUint64(!!(AssignPtrInt32(wc, wchar_t(*(*uint8)(unsafe.Pointer(s)))) != 0))
+__8:
+ ;
+ if !(func() int32 {
+ if !!(int32(*(*uintptr)(unsafe.Pointer((*__pthread)(unsafe.Pointer(__pthread_self(tls))).locale))) != 0) {
+ return 4
+ }
+ return 1
+ }() == 1) {
+ goto __9
+ }
+ *(*wchar_t)(unsafe.Pointer(wc)) = 0xdfff & int32(int8(*(*uint8)(unsafe.Pointer(s))))
+ return 1
+__9:
+ ;
+ if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0xc2 > 0xf4-0xc2) {
+ goto __10
+ }
+ goto ilseq
+__10:
+ ;
+ c = X__fsmu8[uint32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0xc2]
+ n--
+__7:
+ ;
+
+ if !(n != 0) {
+ goto __11
+ }
+ if !((int32(*(*uint8)(unsafe.Pointer(s)))>>3-0x10|(int32(*(*uint8)(unsafe.Pointer(s)))>>3+int32_t(c)>>26))&CplInt32(7) != 0) {
+ goto __12
+ }
+ goto ilseq
+__12:
+ ;
+loop:
+ c = c<<6 | uint32(int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0x80)
+ n--
+ if !!(c&(uint32(1)<<31) != 0) {
+ goto __13
+ }
+ *(*uint32)(unsafe.Pointer(st)) = uint32(0)
+ *(*wchar_t)(unsafe.Pointer(wc)) = wchar_t(c)
+ return size_t(N) - n
+__13:
+ ;
+ if !(n != 0) {
+ goto __14
+ }
+ if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0x80 >= uint32(0x40)) {
+ goto __15
+ }
+ goto ilseq
+__15:
+ ;
+ goto loop
+__14:
+ ;
+__11:
+ ;
+
+ *(*uint32)(unsafe.Pointer(st)) = c
+ return Uint64FromInt32(-2)
+ilseq:
+ *(*uint32)(unsafe.Pointer(st)) = uint32(0)
+ *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84
+ return Uint64FromInt32(-1)
+}
+
+var _sinternal_state uint32 /* mbrtowc.c:8:18: */
+
+func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
+ return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
+}
+
+type imaxdiv_t = struct {
+ quot intmax_t
+ rem intmax_t
+} /* inttypes.h:14:40 */
+
+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
+} /* socket.h:22:1 */
+
+type cmsghdr = struct {
+ cmsg_len socklen_t
+ __pad1 int32
+ cmsg_level int32
+ cmsg_type int32
+} /* socket.h:44:1 */
+
+type linger = struct {
+ l_onoff int32
+ l_linger int32
+} /* socket.h:74:1 */
+
+type sockaddr = struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+} /* socket.h:367:1 */
+
+type sockaddr_storage = struct {
+ ss_family sa_family_t
+ __ss_padding [118]int8
+ __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 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
+} /* in.h:16:1 */
+
+type in6_addr = struct {
+ __in6_union struct {
+ _ [0]uint32
+ __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
+ }
+ }
+ sin6_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
+ }
+ }
+ ipv6mr_interface uint32
+} /* in.h:42:1 */
+
+type ip_opts = struct {
+ ip_dst struct{ s_addr in_addr_t }
+ ip_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 }
+} /* 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
+} /* 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 }
+} /* 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 }
+} /* 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
+ }
+} /* 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
+ }
+} /* 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
+ }
+} /* 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 }
+} /* in.h:297:1 */
+
+type in6_pktinfo = struct {
+ ipi6_addr struct {
+ __in6_union struct {
+ _ [0]uint32
+ __s6_addr [16]uint8_t
+ }
+ }
+ ipi6_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
+ }
+ }
+ sin6_scope_id uint32_t
+ }
+ ip6m_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
+} /* 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
+} /* netdb.h:62:1 */
+
+type hostent = struct {
+ h_name uintptr
+ h_aliases uintptr
+ h_addrtype int32
+ h_length int32
+ h_addr_list uintptr
+} /* netdb.h:69:1 */
+
+type servent = struct {
+ s_name uintptr
+ s_aliases uintptr
+ s_port int32
+ _ [4]byte
+ s_proto uintptr
+} /* netdb.h:78:1 */
+
+type protoent = struct {
+ p_name uintptr
+ p_aliases uintptr
+ p_proto int32
+ _ [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
+} /* 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
+ }
+ _ [12]byte
+} /* lookup.h:10:1 */
+
+type address = struct {
+ family int32
+ scopeid uint32
+ addr [16]uint8_t
+ sortkey int32
+} /* lookup.h:20:1 */
+
+type service = struct {
+ port uint16_t
+ proto uint8
+ socktype 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
+} /* lookup.h:34:1 */
+
+func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
+ var cnt size_t
+ cnt = uint64(1)
+__1:
+ if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) {
+ goto __3
+ }
+ goto __2
+__2:
+ cnt++
+ p = (*addrinfo)(unsafe.Pointer(p)).ai_next
+ goto __1
+ goto __3
+__3:
+ ;
+ var b uintptr = p - uintptr(uint64(uintptr(0)))
+ b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot)
+ //TODO LOCK(b->lock);
+ if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) {
+ Xfree(tls, b)
+ }
+ //TODO else UNLOCK(b->lock);
+}
+
+func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
+ 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)).ai_family
+ flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags
+ proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol
+ socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_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)).slot = 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)).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 {
+ 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
+ if k != 0 {
+ (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88
+ }
+ switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family {
+ 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)
+ 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
+ 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)).ref = int16(nais)
+ *(*uintptr)(unsafe.Pointer(res)) = out
+ return 0
+}
+
+type ucred = struct {
+ pid pid_t
+ uid uid_t
+ gid 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
+} /* socket.h:63:1 */
+
+func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
+ 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 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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
+ bp := tls.Alloc(28)
+ defer tls.Free(28)
+
+ //TODO union {
+ //TODO struct sockaddr_in sin;
+ //TODO struct sockaddr_in6 sin6;
+ //TODO } sa = { .sin.sin_family = af };
+ *(*struct {
+ sin sockaddr_in
+ _ [12]byte
+ })(unsafe.Pointer(bp)) = struct {
+ sin sockaddr_in
+ _ [12]byte
+ }{} //TODO-
+ (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO-
+ var sl socklen_t
+ if af == 10 {
+ sl = uint32(unsafe.Sizeof(sockaddr_in6{}))
+ } else {
+ sl = uint32(unsafe.Sizeof(sockaddr_in{}))
+ }
+ var i int32
+
+ *(*uintptr)(unsafe.Pointer(res)) = uintptr(0)
+
+ // Load address argument into sockaddr structure
+ if af == 10 && l == socklen_t(16) {
+ Xmemcpy(tls, bp+8, a, uint64(16))
+ } else if af == 2 && l == socklen_t(4) {
+ Xmemcpy(tls, bp+4, a, uint64(4))
+ } else {
+ *(*int32)(unsafe.Pointer(err)) = 3
+ return 22
+ }
+
+ // Align buffer and check for space for pointers and ip address
+ i = int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))
+ if !(i != 0) {
+ i = int32(unsafe.Sizeof(uintptr(0)))
+ }
+ if buflen <= uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))-uint64(i)+uint64(l) {
+ return 34
+ }
+ 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
+ buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))
+ (*hostent)(unsafe.Pointer(h)).h_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))
+ 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)
+
+ switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) {
+ case -3:
+ *(*int32)(unsafe.Pointer(err)) = 2
+ return 11
+ case -12:
+ return 34
+ default:
+ fallthrough
+ case -10:
+ fallthrough
+ case -11:
+ fallthrough
+ case -4:
+ *(*int32)(unsafe.Pointer(err)) = 3
+ return *(*int32)(unsafe.Pointer(X___errno_location(tls)))
+ case 0:
+ 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))
+ *(*uintptr)(unsafe.Pointer(res)) = h
+ return 0
+}
+
+func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
+ return Xgethostbyname2(tls, name, 2)
+}
+
+func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
+ 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)).h_addrtype = af
+ (*hostent)(unsafe.Pointer(h)).h_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)).h_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)).h_aliases = buf
+ buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0))))
+ (*hostent)(unsafe.Pointer(h)).h_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)).h_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))
+
+ 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))
+ } else {
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0)
+ }
+
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0)
+
+ *(*uintptr)(unsafe.Pointer(res)) = h
+ return 0
+}
+
+func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
+ return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
+}
+
+type if_nameindex = struct {
+ if_index uint32
+ _ [4]byte
+ if_name uintptr
+} /* if.h:12:1 */
+
+type ifaddr = struct {
+ ifa_addr struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+ }
+ ifa_ifu struct {
+ ifu_broadaddr struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+ }
+ }
+ ifa_ifp uintptr
+ ifa_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
+} /* 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
+ }
+ _ [8]byte
+ }
+} /* if.h:76:1 */
+
+type ifconf = struct {
+ ifc_len int32
+ _ [4]byte
+ ifc_ifcu struct{ ifcu_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
+} /* nameser.h:39:9 */
+
+type ns_msg = __ns_msg /* nameser.h:46:3 */
+
+type _ns_flagdata = struct {
+ mask int32
+ shift 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
+} /* 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 {
+ name [1025]int8
+ alg [1025]int8
+ _ [6]byte
+ data uintptr
+ len int32
+ _ [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
+} /* 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 {
+ _ [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 */
+} /* 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
+ }
+} /* resolv.h:26:9 */
+
+// unused; purely for broken apps
+type res_state = uintptr /* resolv.h:62:3 */
+
+type res_sym = struct {
+ number int32
+ _ [4]byte
+ name uintptr
+ humanname 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+25,
+ 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+50)
+}
+
+var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 59)) /* 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+76, ts+87)
+ if !(f != 0) {
+ return
+ }
+ if family == 2 {
+ Xmemcpy(tls, bp+uintptr(12), a, uint64(4))
+ Xmemcpy(tls, bp, ts+90, 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)).family == 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)
+ }
+
+ if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != 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);
+}
+
+func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
+ bp := tls.Alloc(347)
+ defer tls.Free(347)
+
+ // var ptr [78]int8 at bp, 78
+
+ // var buf [256]int8 at bp+78, 256
+
+ // var num [13]int8 at bp+334, 13
+
+ var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family)
+ var a uintptr
+ var scopeid uint32
+
+ switch af {
+ case 2:
+ a = sa1 + 4
+ if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{})) {
+ return -6
+ }
+ mkptr4(tls, bp, a)
+ scopeid = uint32(0)
+ break
+ case 10:
+ a = sa1 + 8
+ if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) {
+ return -6
+ }
+ if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
+ mkptr6(tls, bp, a)
+ } else {
+ mkptr4(tls, bp, a+uintptr(12))
+ }
+ scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id
+ break
+ default:
+ return -6
+ }
+
+ if node != 0 && nodelen != 0 {
+ *(*int8)(unsafe.Pointer(bp + 78)) = int8(0)
+ if !(flags&0x01 != 0) {
+ reverse_hosts(tls, bp+78, a, scopeid, af)
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) && !(flags&0x01 != 0) {
+ Xabort(tls) //TODO-
+ // unsigned char query[18+PTR_MAX], reply[512];
+ // int qlen = __res_mkquery(0, ptr, 1, RR_PTR,
+ // 0, 0, 0, query, sizeof query);
+ // query[3] = 0; /* don't need AD flag */
+ // int rlen = __res_send(query, qlen, reply, sizeof reply);
+ // buf[0] = 0;
+ // if (rlen > 0)
+ // __dns_parse(reply, rlen, dns_parse_callback, buf);
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) {
+ if flags&0x08 != 0 {
+ return -2
+ }
+ Xinet_ntop(tls, af, a, bp+78, uint32(unsafe.Sizeof([256]int8{})))
+ if scopeid != 0 {
+ Xabort(tls) //TODO-
+ // char *p = 0, tmp[IF_NAMESIZE+1];
+ // if (!(flags & NI_NUMERICSCOPE) &&
+ // (IN6_IS_ADDR_LINKLOCAL(a) ||
+ // IN6_IS_ADDR_MC_LINKLOCAL(a)))
+ // p = if_indextoname(scopeid, tmp+1);
+ // if (!p)
+ // p = itoa(num, scopeid);
+ // *--p = '%';
+ // strcat(buf, p);
+ }
+ }
+ if Xstrlen(tls, bp+78) >= size_t(nodelen) {
+ return -12
+ }
+ Xstrcpy(tls, node, bp+78)
+ }
+
+ if serv != 0 && servlen != 0 {
+ var p uintptr = bp + 78 /* buf */
+ var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port))
+ *(*int8)(unsafe.Pointer(bp + 78)) = int8(0)
+ if !(flags&0x02 != 0) {
+ reverse_services(tls, bp+78, port, flags&0x10)
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
+ p = itoa(tls, bp+334, uint32(port))
+ }
+ if Xstrlen(tls, p) >= size_t(servlen) {
+ return -12
+ }
+ Xstrcpy(tls, serv, p)
+ }
+
+ return 0
+}
+
+var Xh_errno int32 /* h_errno.c:4:5: */
+
+func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&Xh_errno))
+}
+
+func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
+ 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+103, 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+90, uint64(12)) != 0 {
+ Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
+ ts+115,
+ 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+139,
+ 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+169))
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
+ 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)).family = 2
+ (*address)(unsafe.Pointer(buf)).scopeid = 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)).family = 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)).scopeid = uint32(scopeid)
+ return 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.family = 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
+ *(*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+76, ts+87)
+ 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 {
+ addrs uintptr
+ canon uintptr
+ cnt int32
+ _ [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 {
+ addr [16]uint8
+ len uint8
+ mask uint8
+ prec uint8
+ label 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)},
+ // Last rule must match all addresses to stop loop.
+ {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: 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 {
+ 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)))) {
+ 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))).label)
+}
+
+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)).sortkey - (*address)(unsafe.Pointer(a)).sortkey
+}
+
+func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
+ 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)).family != 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)).family
+ 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_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)}
+ 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+90, uint64(12))
+ Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
+ Xmemcpy(tls, bp+8,
+ ts+90, 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)).label)
+ var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec)
+ 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)).sortkey = 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: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
+ 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)).port = uint16_t(0)
+ (*service)(unsafe.Pointer(buf)).proto = uint8(proto)
+ (*service)(unsafe.Pointer(buf)).socktype = 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)).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)
+ }
+ 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)
+ }
+ 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 temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
+ x = x ^ x>>11
+ x = x ^ x<<7&0x9D2C5680
+ x = x ^ x<<15&0xEFC60000
+ x = x ^ x>>18
+ return x
+}
+
+func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
+ return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
+}
+
+func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
+ var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
+ if owner&CplInt32(0x40000000) == tid {
+ return 0
+ }
+ owner = a_cas(tls, f+140, 0, tid)
+ if !(owner != 0) {
+ return 1
+ }
+ for AssignInt32(&owner, a_cas(tls, f+140, 0, tid|0x40000000)) != 0 {
+ if owner&0x40000000 != 0 || a_cas(tls, f+140, owner, owner|0x40000000) == owner {
+ __futexwait(tls, f+140, owner|0x40000000, 1)
+ }
+ }
+ return 1
+}
+
+func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ if a_swap(tls, f+140, 0)&0x40000000 != 0 {
+ __wake(tls, f+140, 1, 1)
+ }
+}
+
+func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
+ if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
+ (*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))
+ }
+ (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0)))
+ if (*FILE)(unsafe.Pointer(f)).flags&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 {
+ return -1
+ }
+ return 0
+}
+
+func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ 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)).read})).f(tls, f, bp, uint64(1)) == uint64(1) {
+ return int32(*(*uint8)(unsafe.Pointer(bp)))
+ }
+ return -1
+}
+
+func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
+ var ret int32
+ var ap va_list
+ _ = ap
+ ap = va
+ ret = Xvsscanf(tls, s, fmt, ap)
+ _ = ap
+ return ret
+}
+
+type wctrans_t = uintptr /* wctype.h:20:19 */
+
+func store_int(tls *TLS, dest uintptr, size int32, i uint64) { /* vfscanf.c:22:13: */
+ if !(dest != 0) {
+ return
+ }
+ switch size {
+ case -2:
+ *(*int8)(unsafe.Pointer(dest)) = int8(i)
+ break
+ case -1:
+ *(*int16)(unsafe.Pointer(dest)) = int16(i)
+ break
+ case 0:
+ *(*int32)(unsafe.Pointer(dest)) = int32(i)
+ break
+ case 1:
+ *(*int64)(unsafe.Pointer(dest)) = int64(i)
+ break
+ case 3:
+ *(*int64)(unsafe.Pointer(dest)) = int64(i)
+ break
+ }
+}
+
+func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
+ var p uintptr
+ var i uint32
+ var ap2 va_list
+ _ = ap2
+ ap2 = ap
+ for i = n; i > uint32(1); i-- {
+ VaUintptr(&ap2)
+ }
+ p = VaUintptr(&ap2)
+ _ = ap2
+ return p
+}
+
+func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
+ bp := tls.Alloc(276)
+ defer tls.Free(276)
+
+ var width int32
+ var size int32
+ var alloc int32
+ var base int32
+ var p uintptr
+ var c int32
+ var t int32
+ var s uintptr
+ var wcs uintptr
+ // var st mbstate_t at bp+268, 8
+
+ var dest uintptr
+ var invert int32
+ var matches int32
+ var x uint64
+ var y float64
+ var pos off_t
+ // var scanset [257]uint8 at bp, 257
+
+ var i size_t
+ var k size_t
+ // var wc wchar_t at bp+260, 4
+
+ var __need_unlock int32
+ var tmp uintptr
+ var tmp1 uintptr
+ alloc = 0
+ dest = uintptr(0)
+ matches = 0
+ pos = int64(0)
+ __need_unlock = 0
+
+ if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) {
+ goto __1
+ }
+ X__toread(tls, f)
+__1:
+ ;
+ if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) {
+ goto __2
+ }
+ goto input_fail
+__2:
+ ;
+
+ p = fmt
+__3:
+ if !(*(*uint8)(unsafe.Pointer(p)) != 0) {
+ goto __5
+ }
+
+ alloc = 0
+
+ if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0) {
+ goto __6
+ }
+__7:
+ if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + 1)))) != 0) {
+ goto __8
+ }
+ p++
+ goto __7
+__8:
+ ;
+ X__shlim(tls, f, int64(0))
+__9:
+ if !(__isspace(tls, 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))))
+ }
+ return X__shgetc(tls, f)
+ }()) != 0) {
+ goto __10
+ }
+ goto __9
+__10:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ goto __4
+__6:
+ ;
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) != '%' || int32(*(*uint8)(unsafe.Pointer(p + 1))) == '%') {
+ goto __11
+ }
+ X__shlim(tls, f, int64(0))
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '%') {
+ goto __12
+ }
+ p++
+__14:
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }())) != 0) {
+ goto __15
+ }
+ goto __14
+__15:
+ ;
+ goto __13
+__12:
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }()
+__13:
+ ;
+ if !(c != int32(*(*uint8)(unsafe.Pointer(p)))) {
+ goto __16
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if !(c < 0) {
+ goto __17
+ }
+ goto input_fail
+__17:
+ ;
+ goto match_fail
+__16:
+ ;
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ goto __4
+__11:
+ ;
+
+ p++
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '*') {
+ goto __18
+ }
+ dest = uintptr(0)
+ p++
+ goto __19
+__18:
+ if !(func() int32 {
+ if 0 != 0 {
+ return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p))))
+ }
+ return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10))
+ }() != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == '$') {
+ goto __20
+ }
+ dest = arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-'0'))
+ p += uintptr(2)
+ goto __21
+__20:
+ dest = VaUintptr(&ap)
+__21:
+ ;
+__19:
+ ;
+
+ width = 0
+__22:
+ if !(func() int32 {
+ if 0 != 0 {
+ return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p))))
+ }
+ return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10))
+ }() != 0) {
+ goto __24
+ }
+ width = 10*width + int32(*(*uint8)(unsafe.Pointer(p))) - '0'
+ goto __23
+__23:
+ p++
+ goto __22
+ goto __24
+__24:
+ ;
+
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'm') {
+ goto __25
+ }
+ wcs = uintptr(0)
+ s = uintptr(0)
+ alloc = BoolInt32(!!(dest != 0))
+ p++
+ goto __26
+__25:
+ alloc = 0
+__26:
+ ;
+
+ size = 0
+ switch int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1)))) {
+ case 'h':
+ goto __28
+ case 'l':
+ goto __29
+ case 'j':
+ goto __30
+ case 'z':
+ goto __31
+ case 't':
+ goto __32
+ case 'L':
+ goto __33
+ case 'd':
+ goto __34
+ case 'i':
+ goto __35
+ case 'o':
+ goto __36
+ case 'u':
+ goto __37
+ case 'x':
+ goto __38
+ case 'a':
+ goto __39
+ case 'e':
+ goto __40
+ case 'f':
+ goto __41
+ case 'g':
+ goto __42
+ case 'A':
+ goto __43
+ case 'E':
+ goto __44
+ case 'F':
+ goto __45
+ case 'G':
+ goto __46
+ case 'X':
+ goto __47
+ case 's':
+ goto __48
+ case 'c':
+ goto __49
+ case '[':
+ goto __50
+ case 'S':
+ goto __51
+ case 'C':
+ goto __52
+ case 'p':
+ goto __53
+ case 'n':
+ goto __54
+ default:
+ goto __55
+ }
+ goto __27
+__28:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'h') {
+ goto __56
+ }
+ p++
+ size = -2
+ goto __57
+__56:
+ size = -1
+__57:
+ ;
+ goto __27
+__29:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'l') {
+ goto __58
+ }
+ p++
+ size = 3
+ goto __59
+__58:
+ size = 1
+__59:
+ ;
+ goto __27
+__30:
+ size = 3
+ goto __27
+__31:
+__32:
+ size = 1
+ goto __27
+__33:
+ size = 2
+ goto __27
+__34:
+__35:
+__36:
+__37:
+__38:
+__39:
+__40:
+__41:
+__42:
+__43:
+__44:
+__45:
+__46:
+__47:
+__48:
+__49:
+__50:
+__51:
+__52:
+__53:
+__54:
+ p--
+ goto __27
+__55:
+ goto fmt_fail
+__27:
+ ;
+
+ t = int32(*(*uint8)(unsafe.Pointer(p)))
+
+ // C or S
+ if !(t&0x2f == 3) {
+ goto __60
+ }
+ t = t | 32
+ size = 1
+__60:
+ ;
+
+ switch t {
+ case 'c':
+ goto __62
+ case '[':
+ goto __63
+ case 'n':
+ goto __64
+ default:
+ goto __65
+ }
+ goto __61
+__62:
+ if !(width < 1) {
+ goto __66
+ }
+ width = 1
+__66:
+ ;
+__63:
+ goto __61
+__64:
+ store_int(tls, dest, size, uint64(pos))
+ // do not increment match count, etc!
+ goto __4
+__65:
+ X__shlim(tls, f, int64(0))
+__67:
+ if !(__isspace(tls, 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))))
+ }
+ return X__shgetc(tls, f)
+ }()) != 0) {
+ goto __68
+ }
+ goto __67
+__68:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+__61:
+ ;
+
+ X__shlim(tls, f, int64(width))
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() < 0) {
+ goto __69
+ }
+ goto input_fail
+__69:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+
+ switch t {
+ case 's':
+ goto __71
+ case 'c':
+ goto __72
+ case '[':
+ goto __73
+ case 'p':
+ goto __74
+ case 'X':
+ goto __75
+ case 'x':
+ goto __76
+ case 'o':
+ goto __77
+ case 'd':
+ goto __78
+ case 'u':
+ goto __79
+ case 'i':
+ goto __80
+ case 'a':
+ goto __81
+ case 'A':
+ goto __82
+ case 'e':
+ goto __83
+ case 'E':
+ goto __84
+ case 'f':
+ goto __85
+ case 'F':
+ goto __86
+ case 'g':
+ goto __87
+ case 'G':
+ goto __88
+ }
+ goto __70
+__71:
+__72:
+__73:
+ if !(t == 'c' || t == 's') {
+ goto __89
+ }
+ Xmemset(tls, bp, -1, uint64(unsafe.Sizeof([257]uint8{})))
+ *(*uint8)(unsafe.Pointer(bp)) = uint8(0)
+ if !(t == 's') {
+ goto __91
+ }
+ *(*uint8)(unsafe.Pointer(bp + 10)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 11)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 12)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 13)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 14)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 33)) = uint8(0)
+__91:
+ ;
+ goto __90
+__89:
+ if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1)))) == '^') {
+ goto __92
+ }
+ p++
+ invert = 1
+ goto __93
+__92:
+ invert = 0
+__93:
+ ;
+ Xmemset(tls, bp, invert, uint64(unsafe.Sizeof([257]uint8{})))
+ *(*uint8)(unsafe.Pointer(bp)) = uint8(0)
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-') {
+ goto __94
+ }
+ p++
+ *(*uint8)(unsafe.Pointer(bp + 46)) = uint8(1 - invert)
+ goto __95
+__94:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == ']') {
+ goto __96
+ }
+ p++
+ *(*uint8)(unsafe.Pointer(bp + 94)) = uint8(1 - invert)
+__96:
+ ;
+__95:
+ ;
+__97:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) != ']') {
+ goto __99
+ }
+ if !!(int32(*(*uint8)(unsafe.Pointer(p))) != 0) {
+ goto __100
+ }
+ goto fmt_fail
+__100:
+ ;
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-' && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != ']') {
+ goto __101
+ }
+ c = int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1) + UintptrFromInt32(-1))))
+__102:
+ if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) {
+ goto __104
+ }
+ *(*uint8)(unsafe.Pointer(bp + uintptr(1+c))) = uint8(1 - invert)
+ goto __103
+__103:
+ c++
+ goto __102
+ goto __104
+__104:
+ ;
+__101:
+ ;
+ *(*uint8)(unsafe.Pointer(bp + uintptr(1+int32(*(*uint8)(unsafe.Pointer(p)))))) = uint8(1 - invert)
+ goto __98
+__98:
+ p++
+ goto __97
+ goto __99
+__99:
+ ;
+__90:
+ ;
+ wcs = uintptr(0)
+ s = uintptr(0)
+ i = uint64(0)
+ if t == 'c' {
+ k = uint64(uint32(width) + 1)
+ } else {
+ k = uint64(31)
+ }
+ if !(size == 1) {
+ goto __105
+ }
+ if !(alloc != 0) {
+ goto __107
+ }
+ wcs = Xmalloc(tls, k*size_t(unsafe.Sizeof(wchar_t(0))))
+ if !!(wcs != 0) {
+ goto __109
+ }
+ goto alloc_fail
+__109:
+ ;
+ goto __108
+__107:
+ wcs = dest
+__108:
+ ;
+ *(*mbstate_t)(unsafe.Pointer(bp + 268 /* st */)) = mbstate_t{}
+__110:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __111
+ }
+ switch Xmbrtowc(tls, bp+260, func() uintptr { *(*int8)(unsafe.Pointer(bp + 264)) = int8(c); return bp + 264 }(), uint64(1), bp+268 /* &st */) {
+ case Uint64FromInt32(-1):
+ goto __113
+ case Uint64FromInt32(-2):
+ goto __114
+ }
+ goto __112
+__113:
+ goto input_fail
+__114:
+ goto __110
+__112:
+ ;
+ if !(wcs != 0) {
+ goto __115
+ }
+ *(*wchar_t)(unsafe.Pointer(wcs + uintptr(PostIncUint64(&i, 1))*4)) = *(*wchar_t)(unsafe.Pointer(bp + 260 /* wc */))
+__115:
+ ;
+ if !(alloc != 0 && i == k) {
+ goto __116
+ }
+ k = k + (k + uint64(1))
+ tmp = Xrealloc(tls, wcs, k*size_t(unsafe.Sizeof(wchar_t(0))))
+ if !!(tmp != 0) {
+ goto __117
+ }
+ goto alloc_fail
+__117:
+ ;
+ wcs = tmp
+__116:
+ ;
+ goto __110
+__111:
+ ;
+ if !!(Xmbsinit(tls, bp+268) != 0) {
+ goto __118
+ }
+ goto input_fail
+__118:
+ ;
+ goto __106
+__105:
+ if !(alloc != 0) {
+ goto __119
+ }
+ s = Xmalloc(tls, k)
+ if !!(s != 0) {
+ goto __121
+ }
+ goto alloc_fail
+__121:
+ ;
+__122:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __123
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c)
+ if !(i == k) {
+ goto __124
+ }
+ k = k + (k + uint64(1))
+ tmp1 = Xrealloc(tls, s, k)
+ if !!(tmp1 != 0) {
+ goto __125
+ }
+ goto alloc_fail
+__125:
+ ;
+ s = tmp1
+__124:
+ ;
+ goto __122
+__123:
+ ;
+ goto __120
+__119:
+ if !(AssignUintptr(&s, dest) != 0) {
+ goto __126
+ }
+__128:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __129
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c)
+ goto __128
+__129:
+ ;
+ goto __127
+__126:
+__130:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __131
+ }
+ goto __130
+__131:
+ ;
+__127:
+ ;
+__120:
+ ;
+__106:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __132
+ }
+ goto match_fail
+__132:
+ ;
+ if !(t == 'c' && (*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != off_t(width)) {
+ goto __133
+ }
+ goto match_fail
+__133:
+ ;
+ if !(alloc != 0) {
+ goto __134
+ }
+ if !(size == 1) {
+ goto __135
+ }
+ *(*uintptr)(unsafe.Pointer(dest)) = wcs
+ goto __136
+__135:
+ *(*uintptr)(unsafe.Pointer(dest)) = s
+__136:
+ ;
+__134:
+ ;
+ if !(t != 'c') {
+ goto __137
+ }
+ if !(wcs != 0) {
+ goto __138
+ }
+ *(*wchar_t)(unsafe.Pointer(wcs + uintptr(i)*4)) = 0
+__138:
+ ;
+ if !(s != 0) {
+ goto __139
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(i))) = int8(0)
+__139:
+ ;
+__137:
+ ;
+ goto __70
+__74:
+__75:
+__76:
+ base = 16
+ goto int_common
+__77:
+ base = 8
+ goto int_common
+__78:
+__79:
+ base = 10
+ goto int_common
+__80:
+ base = 0
+int_common:
+ x = X__intscan(tls, f, uint32(base), 0, 2*uint64(0x7fffffffffffffff)+uint64(1))
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __140
+ }
+ goto match_fail
+__140:
+ ;
+ if !(t == 'p' && dest != 0) {
+ goto __141
+ }
+ *(*uintptr)(unsafe.Pointer(dest)) = uintptr(uintptr_t(x))
+ goto __142
+__141:
+ store_int(tls, dest, size, x)
+__142:
+ ;
+ goto __70
+__81:
+__82:
+__83:
+__84:
+__85:
+__86:
+__87:
+__88:
+ y = X__floatscan(tls, f, size, 0)
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __143
+ }
+ goto match_fail
+__143:
+ ;
+ if !(dest != 0) {
+ goto __144
+ }
+ switch size {
+ case 0:
+ goto __146
+ case 1:
+ goto __147
+ case 2:
+ goto __148
+ }
+ goto __145
+__146:
+ *(*float32)(unsafe.Pointer(dest)) = float32(y)
+ goto __145
+__147:
+ *(*float64)(unsafe.Pointer(dest)) = y
+ goto __145
+__148:
+ *(*float64)(unsafe.Pointer(dest)) = y
+ goto __145
+__145:
+ ;
+__144:
+ ;
+ goto __70
+__70:
+ ;
+
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ if !(dest != 0) {
+ goto __149
+ }
+ matches++
+__149:
+ ;
+ goto __4
+__4:
+ p++
+ goto __3
+ goto __5
+__5:
+ ;
+ if !(0 != 0) {
+ goto __150
+ }
+fmt_fail:
+alloc_fail:
+input_fail:
+ if !!(matches != 0) {
+ goto __151
+ }
+ matches--
+__151:
+ ;
+match_fail:
+ if !(alloc != 0) {
+ goto __152
+ }
+ Xfree(tls, s)
+ Xfree(tls, wcs)
+__152:
+ ;
+__150:
+ ;
+__153:
+ if !(__need_unlock != 0) {
+ goto __156
+ }
+ X__unlockfile(tls, f)
+__156:
+ ;
+ goto __154
+__154:
+ if 0 != 0 {
+ goto __153
+ }
+ goto __155
+__155:
+ ;
+ return matches
+}
+
+func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vsscanf.c:4:15: */
+ var src uintptr = (*FILE)(unsafe.Pointer(f)).cookie
+ var k size_t = len + uint64(256)
+ var end uintptr = Xmemchr(tls, src, 0, k)
+ if end != 0 {
+ k = size_t((int64(end) - int64(src)) / 1)
+ }
+ if k < len {
+ len = k
+ }
+ Xmemcpy(tls, buf, src, len)
+ (*FILE)(unsafe.Pointer(f)).rpos = src + uintptr(len)
+ (*FILE)(unsafe.Pointer(f)).rend = src + uintptr(k)
+ (*FILE)(unsafe.Pointer(f)).cookie = src + uintptr(k)
+ return len
+}
+
+func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
+ bp := tls.Alloc(232)
+ defer tls.Free(232)
+
+ *(*FILE)(unsafe.Pointer(bp /* f */)) = FILE{read: *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*TLS, uintptr, uintptr, size_t) size_t
+ }{string_read})), buf: s, lock: -1, cookie: s}
+ return Xvfscanf(tls, bp, fmt, ap)
+}
+
+func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
+ 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)).buf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).rend = 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
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ return float32(strtox(tls, s, p, 0))
+}
+
+func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ return strtox(tls, s, p, 1)
+}
+
+func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ 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)).buf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).rend = 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)
+ *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt)
+ }
+ return y
+}
+
+func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ return intmax_t(Xstrtoll(tls, s, p, base))
+}
+
+func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ return uintmax_t(Xstrtoull(tls, s, p, base))
+}
+
+func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
+ 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 Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var l size_t = Xstrnlen(tls, d, n)
+ if l == n {
+ return l + Xstrlen(tls, s)
+ }
+ return l + Xstrlcpy(tls, d+uintptr(l), s, n-l)
+}
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// POSIX/SUS requirements follow. These numbers come directly
+// from SUS and have nothing to do with the host system.
+
+func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var d0 uintptr
+ var wd uintptr
+ var ws uintptr
+ d0 = d
+
+ if !!(int32(PostDecUint64(&n, 1)) != 0) {
+ goto __1
+ }
+ goto finish
+__1:
+ ;
+ if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) == uintptr_t(d)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1))) {
+ goto __2
+ }
+__3:
+ if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) != 0 && n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) {
+ goto __5
+ }
+ goto __4
+__4:
+ n--
+ s++
+ d++
+ goto __3
+ goto __5
+__5:
+ ;
+ if !(n != 0 && *(*int8)(unsafe.Pointer(s)) != 0) {
+ goto __6
+ }
+ wd = d
+ ws = s
+__7:
+ if !(n >= size_t(unsafe.Sizeof(size_t(0))) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64(Uint64FromInt32(-1))/uint64(255)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64(Uint64FromInt32(-1))/uint64(255)*uint64(255/2+1)) != 0)) {
+ goto __9
+ }
+ *(*size_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws))
+ goto __8
+__8:
+ n = n - size_t(unsafe.Sizeof(size_t(0)))
+ ws += 8
+ wd += 8
+ goto __7
+ goto __9
+__9:
+ ;
+ d = wd
+ s = ws
+__6:
+ ;
+__2:
+ ;
+__10:
+ if !(n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) {
+ goto __12
+ }
+ goto __11
+__11:
+ n--
+ s++
+ d++
+ goto __10
+ goto __12
+__12:
+ ;
+ *(*int8)(unsafe.Pointer(d)) = int8(0)
+finish:
+ return size_t((int64(d)-int64(d0))/1) + Xstrlen(tls, s)
+}
+
+func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
+ var l uintptr = _l
+ var r uintptr = _r
+ if !(int32(PostDecUint64(&n, 1)) != 0) {
+ return 0
+ }
+__1:
+ if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) {
+ goto __3
+ }
+ goto __2
+__2:
+ l++
+ r++
+ n--
+ goto __1
+ goto __3
+__3:
+ ;
+ return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r))))
+}
+
+func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
+ return Xstrncasecmp(tls, l, r, n)
+}
+
+func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var a uintptr = d
+ d += uintptr(Xstrlen(tls, d))
+ for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
+ n--
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1)))
+ }
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = int8(0)
+ return a
+}
+
+func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
+ 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 Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
+ if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
+ return uintptr(0)
+ }
+ s += uintptr(Xstrspn(tls, s, sep))
+ if !(int32(*(*int8)(unsafe.Pointer(s))) != 0) {
+ return AssignPtrUintptr(uintptr(unsafe.Pointer(&_sp)), uintptr(0))
+ }
+ _sp = s + uintptr(Xstrcspn(tls, s, sep))
+ if *(*int8)(unsafe.Pointer(_sp)) != 0 {
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&_sp, 1))) = int8(0)
+ } else {
+ _sp = uintptr(0)
+ }
+ return s
+}
+
+var _sp uintptr /* strtok.c:5:14: */
+
+func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return *(*int32)(unsafe.Pointer(a + 6*4))
+}
+
+func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
+ *(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
+ return 0
+}
+
+//
+// int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size)
+// {
+// *size = a->_a_guardsize;
+// return 0;
+// }
+//
+// int pthread_attr_getinheritsched(const pthread_attr_t *restrict a, int *restrict inherit)
+// {
+// *inherit = a->_a_sched;
+// return 0;
+// }
+//
+// int pthread_attr_getschedparam(const pthread_attr_t *restrict a, struct sched_param *restrict param)
+// {
+// param->sched_priority = a->_a_prio;
+// return 0;
+// }
+//
+// int pthread_attr_getschedpolicy(const pthread_attr_t *restrict a, int *restrict policy)
+// {
+// *policy = a->_a_policy;
+// return 0;
+// }
+//
+// int pthread_attr_getscope(const pthread_attr_t *restrict a, int *restrict scope)
+// {
+// *scope = PTHREAD_SCOPE_SYSTEM;
+// return 0;
+// }
+//
+// int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size)
+// {
+// if (!a->_a_stackaddr)
+// return EINVAL;
+// *size = a->_a_stacksize;
+// *addr = (void *)(a->_a_stackaddr - *size);
+// return 0;
+// }
+//
+// int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size)
+// {
+// *size = a->_a_stacksize;
+// return 0;
+// }
+//
+// int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = !!a->__attr;
+// return 0;
+// }
+//
+// int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk)
+// {
+// *clk = a->__attr & 0x7fffffff;
+// return 0;
+// }
+//
+// int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr>>31;
+// return 0;
+// }
+//
+// int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)
+// {
+// *protocol = PTHREAD_PRIO_NONE;
+// return 0;
+// }
+// int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr / 128U % 2;
+// return 0;
+// }
+//
+// int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *restrict robust)
+// {
+// *robust = a->__attr / 4U % 2;
+// return 0;
+// }
+
+func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
+}
+
+// int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type)
+// {
+// *type = a->__attr & 3;
+// return 0;
+// }
+//
+// int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr[0];
+// return 0;
+// }
+
+func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
+ if uint32(state) > 1 {
+ return 22
+ }
+ *(*int32)(unsafe.Pointer(a + 6*4)) = state
+ return 0
+}
+
+func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
+ return *(*int32)(unsafe.Pointer(m)) & 15
+}
+
+// int __pthread_mutex_lock(pthread_mutex_t *m)
+// {
+// if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL
+// && !a_cas(&m->_m_lock, 0, EBUSY))
+// return 0;
+//
+// return __pthread_mutex_timedlock(m, 0);
+// }
+//
+// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
+
+func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return 0
+}
+
+func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ *(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
+ return 0
+}
+
+func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
+ 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)
+ return 0
+}
+
+func init() {
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&ptable)) + 0)) = uintptr(unsafe.Pointer(&table)) + uintptr(128)*2 // __ctype_b_loc.c:36:45:
+}
+
+var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00.\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_linux_386.go b/vendor/modernc.org/libc/musl_linux_386.go
index 3b730c21c..25946cd0b 100644
--- a/vendor/modernc.org/libc/musl_linux_386.go
+++ b/vendor/modernc.org/libc/musl_linux_386.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:366:9 */
type locale_t = uintptr /* alltypes.h:366:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -569,6 +617,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int32 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -591,6 +642,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1350,6 +1404,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1527,6 +1584,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1832,6 +1892,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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)
// If lim is nonzero, rend must be a valid pointer.
@@ -1843,6 +1906,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1904,10 +1970,16 @@ type lconv = struct {
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 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1932,6 +2004,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1956,28 +2031,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2007,6 +2100,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2043,6 +2139,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2086,7 +2185,7 @@ type __libc = struct {
global_locale struct{ cat [6]uintptr }
} /* libc.h:20:1 */
-type time_t = int64 /* alltypes.h:108:16 */
+type time_t = int32 /* alltypes.h:108:16 */
type clockid_t = int32 /* alltypes.h:237:13 */
@@ -3360,6 +3459,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:360:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3483,6 +3585,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3772,6 +3877,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -3796,6 +3904,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -3995,6 +4106,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -4021,6 +4135,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4106,10 +4223,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -4136,6 +4259,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4227,6 +4353,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4516,6 +4645,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4616,10 +4748,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -4671,6 +4809,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4745,6 +4886,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4842,6 +4986,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -5151,6 +5298,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5317,6 +5467,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5450,10 +5603,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5472,12 +5631,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+76, 0)&0x40000000 != 0 {
__wake(tls, f+76, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5497,6 +5662,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5505,6 +5673,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5519,6 +5690,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5568,6 +5742,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6443,6 +6620,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -6453,6 +6633,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -6495,14 +6678,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6524,30 +6716,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -6557,6 +6770,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6574,6 +6790,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6645,6 +6864,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint32(&n, 1)) != 0) {
@@ -6667,10 +6889,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
@@ -6682,6 +6910,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -6690,6 +6921,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6713,6 +6947,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6732,10 +6969,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 3*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 3*4))
return 0
}
@@ -6822,6 +7065,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6838,6 +7084,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6846,6 +7095,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6861,15 +7113,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_amd64.go b/vendor/modernc.org/libc/musl_linux_amd64.go
index bb9918f1b..ab2f2ff29 100644
--- a/vendor/modernc.org/libc/musl_linux_amd64.go
+++ b/vendor/modernc.org/libc/musl_linux_amd64.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,54 +435,93 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__builtin_isprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -486,6 +531,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -539,6 +587,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -575,6 +626,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -597,6 +651,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1360,6 +1417,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1537,6 +1597,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1842,6 +1905,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1853,6 +1919,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1914,10 +1983,16 @@ type lconv = struct {
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 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1942,6 +2017,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1966,28 +2044,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2017,6 +2113,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2053,6 +2152,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3390,6 +3492,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:337:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3513,6 +3618,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3815,6 +3923,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3839,6 +3950,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4043,6 +4157,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4069,6 +4186,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4154,10 +4274,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4184,6 +4310,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4275,6 +4404,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4574,6 +4706,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4674,10 +4809,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4729,6 +4870,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4803,6 +4947,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4900,6 +5047,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5210,6 +5360,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5376,6 +5529,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5509,10 +5665,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5531,12 +5693,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5556,6 +5724,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5564,6 +5735,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5578,6 +5752,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5627,6 +5804,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -5660,12 +5840,7 @@ func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c
dest = uintptr(0)
matches = 0
pos = int64(0)
- __need_unlock = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).lock >= 0 {
- return X__lockfile(tls, f)
- }
- return 0
- }()
+ __need_unlock = 0
if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) {
goto __1
@@ -6502,6 +6677,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6512,6 +6690,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6554,14 +6735,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6583,30 +6773,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6616,6 +6827,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6633,6 +6847,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6704,6 +6921,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6726,10 +6946,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
@@ -6741,6 +6967,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6749,6 +6978,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6772,6 +7004,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6791,10 +7026,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6881,6 +7122,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6897,6 +7141,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6905,6 +7152,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6920,15 +7170,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_arm.go b/vendor/modernc.org/libc/musl_linux_arm.go
index 8d4208843..ef469616f 100644
--- a/vendor/modernc.org/libc/musl_linux_arm.go
+++ b/vendor/modernc.org/libc/musl_linux_arm.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:336:9 */
type locale_t = uintptr /* alltypes.h:336:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -571,6 +619,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int32 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -593,6 +644,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1354,6 +1408,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1531,6 +1588,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1836,6 +1896,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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)
// If lim is nonzero, rend must be a valid pointer.
@@ -1847,6 +1910,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1908,10 +1974,16 @@ type lconv = struct {
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: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1936,6 +2008,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1960,28 +2035,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2011,6 +2104,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2047,6 +2143,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2090,7 +2189,7 @@ type __libc = struct {
global_locale struct{ cat [6]uintptr }
} /* libc.h:20:1 */
-type time_t = int64 /* alltypes.h:78:16 */
+type time_t = int32 /* alltypes.h:78:16 */
type clockid_t = int32 /* alltypes.h:207:13 */
@@ -3393,6 +3492,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:330:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3516,6 +3618,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3805,6 +3910,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -3829,6 +3937,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4028,6 +4139,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -4054,6 +4168,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4139,10 +4256,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -4169,6 +4292,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4260,6 +4386,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4549,6 +4678,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4649,10 +4781,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -4704,6 +4842,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4778,6 +4919,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4875,6 +5019,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -5184,6 +5331,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5350,6 +5500,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -5483,10 +5636,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5505,12 +5664,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+76, 0)&0x40000000 != 0 {
__wake(tls, f+76, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5530,6 +5695,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5538,6 +5706,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5552,6 +5723,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5601,6 +5775,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6476,6 +6653,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -6486,6 +6666,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -6528,14 +6711,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6557,30 +6749,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -6590,6 +6803,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6607,6 +6823,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6678,6 +6897,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint32(&n, 1)) != 0) {
@@ -6700,10 +6922,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 {
@@ -6715,6 +6943,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -6723,6 +6954,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6746,6 +6980,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6765,10 +7002,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 3*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 3*4))
return 0
}
@@ -6855,6 +7098,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6871,6 +7117,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6879,6 +7128,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6894,15 +7146,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_arm64.go b/vendor/modernc.org/libc/musl_linux_arm64.go
index 0e3b64c11..65e3ed7ec 100644
--- a/vendor/modernc.org/libc/musl_linux_arm64.go
+++ b/vendor/modernc.org/libc/musl_linux_arm64.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:351:9 */
type locale_t = uintptr /* alltypes.h:351:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -571,6 +619,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -593,6 +644,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1356,6 +1410,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1533,6 +1590,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1838,6 +1898,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1849,6 +1912,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1910,10 +1976,16 @@ type lconv = struct {
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: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1938,6 +2010,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1962,28 +2037,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2013,6 +2106,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2049,6 +2145,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3474,6 +3573,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:345:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3597,6 +3699,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3899,6 +4004,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3923,6 +4031,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4127,6 +4238,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4153,6 +4267,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4238,10 +4355,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4268,6 +4391,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4359,6 +4485,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4658,6 +4787,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4758,10 +4890,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4813,6 +4951,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4887,6 +5028,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4984,6 +5128,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5294,6 +5441,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5460,6 +5610,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5593,10 +5746,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5615,12 +5774,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5640,6 +5805,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5648,6 +5816,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5662,6 +5833,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5711,6 +5885,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6586,6 +6763,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6596,6 +6776,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6638,14 +6821,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6667,30 +6859,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6700,6 +6913,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6717,6 +6933,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6788,6 +7007,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6810,10 +7032,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 {
@@ -6825,6 +7053,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6833,6 +7064,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6856,6 +7090,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6875,10 +7112,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6965,6 +7208,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6981,6 +7227,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6989,6 +7238,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -7004,15 +7256,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_loong64.go b/vendor/modernc.org/libc/musl_linux_loong64.go
index 7921d9927..9171f999f 100644
--- a/vendor/modernc.org/libc/musl_linux_loong64.go
+++ b/vendor/modernc.org/libc/musl_linux_loong64.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -571,6 +619,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -593,6 +644,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1356,6 +1410,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1533,6 +1590,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1838,6 +1898,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1849,6 +1912,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1910,10 +1976,16 @@ type lconv = struct {
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 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1938,6 +2010,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1962,28 +2037,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2013,6 +2106,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2049,6 +2145,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3386,6 +3485,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:337:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3509,6 +3611,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3811,6 +3916,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3835,6 +3943,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4039,6 +4150,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4065,6 +4179,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4150,10 +4267,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4180,6 +4303,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4271,6 +4397,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4570,6 +4699,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4670,10 +4802,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4725,6 +4863,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4799,6 +4940,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4896,6 +5040,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5206,6 +5353,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5372,6 +5522,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5505,10 +5658,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5527,12 +5686,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5552,6 +5717,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5560,6 +5728,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5574,6 +5745,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5623,6 +5797,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6498,6 +6675,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6508,6 +6688,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6550,14 +6733,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6579,30 +6771,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6612,6 +6825,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6629,6 +6845,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6700,6 +6919,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6722,10 +6944,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
@@ -6737,6 +6965,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6745,6 +6976,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6768,6 +7002,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6787,10 +7024,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6877,6 +7120,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6893,6 +7139,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6901,6 +7150,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6916,15 +7168,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_mips64le.go b/vendor/modernc.org/libc/musl_linux_mips64le.go
new file mode 100644
index 000000000..ab2f2ff29
--- /dev/null
+++ b/vendor/modernc.org/libc/musl_linux_mips64le.go
@@ -0,0 +1,7203 @@
+// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_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 src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.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/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.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/gethostbyname_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/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.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 src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.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
+)
+
+const ( /* pthread_impl.h:58:1: */
+ DT_EXITING = 0
+ DT_JOINABLE = 1
+ DT_DETACHED = 2
+)
+
+type ptrdiff_t = int64 /* <builtin>:3:26 */
+
+type size_t = uint64 /* <builtin>:9:23 */
+
+type wchar_t = int32 /* <builtin>:15:24 */
+
+type uint16_t = uint16 /* alltypes.h:126:25 */
+
+type uint32_t = uint32 /* alltypes.h:131:25 */
+
+type uint64_t = uint64 /* alltypes.h:136:25 */
+
+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
+}
+
+var table = [384]uint16{
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536),
+ uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536),
+ uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536),
+ uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536),
+ uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+ uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0),
+} /* __ctype_b_loc.c:9:29 */
+
+var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
+
+func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&ptable))
+}
+
+func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
+ return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
+}
+
+type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */
+
+type locale_t = uintptr /* alltypes.h:343:32 */
+
+func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisalnum(tls, c)
+}
+
+func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisalpha(tls, c)
+}
+
+func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('0') < uint32(10))
+}
+
+func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisdigit(tls, c)
+}
+
+func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('a') < uint32(26))
+}
+
+func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xislower(tls, c)
+}
+
+func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
+}
+
+func X__builtin_isprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
+}
+
+func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisprint(tls, c)
+}
+
+func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ return Bool32(uint32(c)-uint32('A') < uint32(26))
+}
+
+func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisupper(tls, c)
+}
+
+func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
+ return Xisxdigit(tls, c)
+}
+
+type off_t = int64 /* alltypes.h:162:16 */
+
+type ino_t = uint64 /* alltypes.h:167:25 */
+
+type dirent = struct {
+ d_ino ino_t
+ d_off off_t
+ d_reclen uint16
+ d_type uint8
+ d_name [256]int8
+ _ [5]byte
+} /* dirent.h:5:1 */
+
+type __dirstream = struct {
+ tell off_t
+ fd int32
+ buf_pos int32
+ buf_end int32
+ lock [1]int32
+ buf [2048]int8
+} /* dirent.h:20:9 */
+
+type DIR = __dirstream /* dirent.h:20:28 */
+
+type ssize_t = int64 /* alltypes.h:65:15 */
+
+type intptr_t = int64 /* alltypes.h:70:15 */
+
+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 useconds_t = uint32 /* alltypes.h:260:18 */
+
+type div_t = struct {
+ quot int32
+ rem int32
+} /* stdlib.h:62:35 */
+type ldiv_t = struct {
+ quot int64
+ rem int64
+} /* stdlib.h:63:36 */
+type lldiv_t = struct {
+ quot int64
+ rem int64
+} /* stdlib.h:64:41 */
+
+func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
+ var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
+ Xfree(tls, dir)
+ return ret
+}
+
+type mode_t = uint32 /* alltypes.h:152:18 */
+
+type iovec = struct {
+ iov_base uintptr
+ iov_len size_t
+} /* alltypes.h:355:1 */
+
+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
+} /* fcntl.h:24:1 */
+
+type file_handle = struct {
+ _ [0]uint32
+ handle_bytes uint32
+ handle_type int32
+} /* fcntl.h:167:1 */
+
+type f_owner_ex = struct {
+ __type int32
+ pid pid_t
+} /* fcntl.h:172:1 */
+
+type syscall_arg_t = int64 /* syscall.h:22:14 */
+
+func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
+ var fd int32
+ var dir uintptr
+
+ if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 {
+ return uintptr(0)
+ }
+ if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) {
+ X__syscall1(tls, int64(3), int64(fd))
+ return uintptr(0)
+ }
+ (*DIR)(unsafe.Pointer(dir)).fd = fd
+ return dir
+}
+
+type max_align_t = struct {
+ __ll int64
+ __ld float64
+} /* alltypes.h:41:54 */
+
+type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */
+
+func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
+ var de uintptr
+
+ if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
+ var len int32 = int32(X__syscall3(tls, int64(217), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]int8{}))))
+ if len <= 0 {
+ if len < 0 && len != -2 {
+ *(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len
+ }
+ return uintptr(0)
+ }
+ (*DIR)(unsafe.Pointer(dir)).buf_end = len
+ (*DIR)(unsafe.Pointer(dir)).buf_pos = 0
+ }
+ de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos)
+ *(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen)
+ (*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off
+ return de
+}
+
+type uintptr_t = uint64 /* alltypes.h:55:24 */
+
+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 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 _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
+} /* 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 {
+ _ [0]uint64
+ __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 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 float64;} at bp, 8
+
+ *(*float64)(unsafe.Pointer(bp)) = __f
+ return *(*uint64)(unsafe.Pointer(bp))
+}
+
+type __pthread = struct {
+ self uintptr
+ dtv uintptr
+ prev uintptr
+ next uintptr
+ sysinfo uintptr_t
+ canary uintptr_t
+ canary2 uintptr_t
+ tid int32
+ errno_val int32
+ detach_state int32
+ cancel int32
+ canceldisable uint8
+ cancelasync uint8
+ tsd_used uint8 /* unsigned char tsd_used: 1, unsigned char dlerror_flag: 1 */
+ _ [5]byte
+ map_base uintptr
+ map_size size_t
+ stack uintptr
+ stack_size size_t
+ guard_size size_t
+ result uintptr
+ cancelbuf uintptr
+ tsd uintptr
+ robust_list struct {
+ head uintptr
+ off int64
+ pending uintptr
+ }
+ timer_id int32
+ _ [4]byte
+ locale locale_t
+ killlock [1]int32
+ _ [4]byte
+ dlerror_buf uintptr
+ stdio_locks uintptr
+ canary_at_end uintptr_t
+ dtv_copy uintptr
+} /* alltypes.h:273:9 */
+
+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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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))))
+ }
+ 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--
+ } else {
+ }
+ }
+ }
+ if uint32(c-'0') >= 10 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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))))
+ }
+ 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))))
+ }
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ gotdig = 1
+ }
+ 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))))
+ }
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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))))
+ }
+ return X__shgetc(tls, f)
+ }() {
+ gotdig = 1
+ }
+
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if pok != 0 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if gotrad != 0 {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ } else {
+ X__shlim(tls, f, int64(0))
+ return float64(0)
+ }
+ e2 = int64(0)
+ }
+ } else {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }())) != 0 {
+ }
+
+ 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))))
+ }
+ 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if pok != 0 {
+ for ; i > uint64(3); i-- {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }()
+ }
+ }
+ }
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() != '(' {
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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))))
+ }
+ 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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--
+ } else {
+ }
+ c = '0'
+ }
+
+ return decfloat(tls, f, c, bits, emin, sign, pok)
+}
+
+// Lookup table for digit values. -1==255>=36 -> invalid
+var table1 = [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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
+ var val uintptr
+ var c int32
+ var neg int32
+ var x uint32
+ var y uint64
+ var bs int32
+ val = uintptr(unsafe.Pointer(&table1)) + 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ }
+ return X__shgetc(tls, f)
+ }()
+ if !(c|32 == 'x') {
+ 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))))
+ }
+ 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--
+ } else {
+ }
+ if !(pok != 0) {
+ goto __10
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 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)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
+ (*FILE)(unsafe.Pointer(f)).shlim = lim
+ (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 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)
+ } else {
+ (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ }
+}
+
+func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ 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)
+ 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)
+ } else {
+ (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ }
+ (*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)
+ }
+ 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
+} /* locale.h:24:1 */
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// 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 */
+
+func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&posix_lconv))
+}
+
+func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) {
+ *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x
+ return r
+ }()
+ var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff))
+ if !(e != 0) {
+ if *(*uint64_t)(unsafe.Pointer(bp))<<1 != 0 {
+ return 3
+ }
+ return 2
+ }
+ if e == 0x7ff {
+ if *(*uint64_t)(unsafe.Pointer(bp))<<12 != 0 {
+ return 0
+ }
+ return 1
+ }
+ return 4
+}
+
+func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) {
+ *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x
+ return r
+ }()
+ var e int32 = int32(*(*uint32_t)(unsafe.Pointer(bp)) >> 23 & uint32_t(0xff))
+ if !(e != 0) {
+ if *(*uint32_t)(unsafe.Pointer(bp))<<1 != 0 {
+ return 3
+ }
+ return 2
+ }
+ if e == 0xff {
+ if *(*uint32_t)(unsafe.Pointer(bp))<<9 != 0 {
+ return 0
+ }
+ return 1
+ }
+ return 4
+}
+
+func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ return X__fpclassify(tls, x)
+}
+
+func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
+ return Xcopysign(tls, x, y)
+}
+
+func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ return Xfabs(tls, x)
+}
+
+func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
+ return Xfmod(tls, x, y)
+}
+
+func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
+ return X__builtin_nanf(tls, ts+13)
+}
+
+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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f 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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var u struct {f 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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
+ return Xscalbn(tls, x, n)
+}
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// POSIX/SUS requirements follow. These numbers come directly
+// from SUS and have nothing to do with the host system.
+
+type __locale_map = struct {
+ __map uintptr
+ map_size size_t
+ name [24]int8
+ next uintptr
+} /* alltypes.h:343:9 */
+
+type tls_module = struct {
+ next uintptr
+ image uintptr
+ len size_t
+ size size_t
+ align size_t
+ offset size_t
+} /* libc.h:14:1 */
+
+type __libc = struct {
+ can_do_threads int8
+ threaded int8
+ secure int8
+ need_locks int8
+ threads_minus_1 int32
+ auxv uintptr
+ tls_head uintptr
+ tls_size size_t
+ tls_align size_t
+ tls_cnt size_t
+ page_size size_t
+ global_locale struct{ cat [6]uintptr }
+} /* libc.h:20:1 */
+
+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
+} /* 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{ __attr uint32 } /* alltypes.h:294:37 */
+
+type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */
+
+type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */
+
+type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */
+
+type __sigset_t = struct{ __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
+ }
+} /* alltypes.h:372:147 */
+
+type pthread_mutex_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [10]int32
+ }
+} /* alltypes.h:377:157 */
+
+type pthread_cond_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [12]int32
+ }
+} /* alltypes.h:387:112 */
+
+type pthread_rwlock_t = struct {
+ __u struct {
+ _ [0]uint64
+ __i [14]int32
+ }
+} /* alltypes.h:397:139 */
+
+type pthread_barrier_t = struct {
+ __u struct {
+ _ [0]uint64
+ __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
+} /* sched.h:19:1 */
+
+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
+} /* time.h:38:1 */
+
+type itimerspec = struct {
+ it_interval struct {
+ tv_sec time_t
+ tv_nsec int64
+ }
+ it_value struct {
+ tv_sec time_t
+ tv_nsec int64
+ }
+} /* time.h:80:1 */
+
+type sigevent = struct {
+ sigev_value struct {
+ _ [0]uint64
+ sival_int int32
+ _ [4]byte
+ }
+ sigev_signo int32
+ sigev_notify int32
+ sigev_notify_function uintptr
+ sigev_notify_attributes uintptr
+ __pad [32]int8
+} /* time.h:107:1 */
+
+type __ptcb = struct {
+ __f uintptr
+ __x uintptr
+ __next uintptr
+} /* alltypes.h:273:9 */
+
+type sigaltstack = struct {
+ ss_sp uintptr
+ ss_flags int32
+ _ [4]byte
+ ss_size size_t
+} /* signal.h:44:9 */
+
+type stack_t = sigaltstack /* signal.h:44:28 */
+
+type greg_t = int64 /* signal.h:59:19 */
+type gregset_t = [23]int64 /* signal.h:59:27 */
+type _fpstate = struct {
+ cwd uint16
+ swd uint16
+ ftw uint16
+ fop uint16
+ rip uint64
+ rdp uint64
+ mxcsr uint32
+ mxcr_mask uint32
+ _st [8]struct {
+ significand [4]uint16
+ exponent uint16
+ padding [3]uint16
+ }
+ _xmm [16]struct{ element [4]uint32 }
+ padding [24]uint32
+} /* signal.h:60:9 */
+
+type fpregset_t = uintptr /* signal.h:71:3 */
+type sigcontext = struct {
+ r8 uint64
+ r9 uint64
+ r10 uint64
+ r11 uint64
+ r12 uint64
+ r13 uint64
+ r14 uint64
+ r15 uint64
+ rdi uint64
+ rsi uint64
+ rbp uint64
+ rbx uint64
+ rdx uint64
+ rax uint64
+ rcx uint64
+ rsp uint64
+ rip uint64
+ eflags uint64
+ cs uint16
+ gs uint16
+ fs uint16
+ __pad0 uint16
+ err uint64
+ trapno uint64
+ oldmask uint64
+ cr2 uint64
+ fpstate uintptr
+ __reserved1 [8]uint64
+} /* signal.h:72:1 */
+
+type mcontext_t = struct {
+ gregs gregset_t
+ fpregs fpregset_t
+ __reserved1 [8]uint64
+} /* signal.h:84:3 */
+
+type __ucontext = struct {
+ uc_flags uint64
+ uc_link uintptr
+ uc_stack stack_t
+ uc_mcontext mcontext_t
+ uc_sigmask sigset_t
+ __fpregs_mem [64]uint64
+} /* signal.h:97:9 */
+
+type ucontext_t = __ucontext /* signal.h:104:3 */
+
+type sigval = struct {
+ _ [0]uint64
+ sival_int int32
+ _ [4]byte
+} /* time.h:107:1 */
+
+type siginfo_t = struct {
+ si_signo int32
+ si_errno int32
+ si_code int32
+ _ [4]byte
+ __si_fields struct {
+ _ [0]uint64
+ __pad [112]int8
+ }
+} /* signal.h:145:3 */
+
+type sigaction = struct {
+ __sa_handler struct{ sa_handler uintptr }
+ sa_mask sigset_t
+ sa_flags int32
+ _ [4]byte
+ sa_restorer uintptr
+} /* signal.h:167:1 */
+
+type sig_t = uintptr /* signal.h:251:14 */
+
+type sig_atomic_t = int32 /* signal.h:269:13 */
+
+func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */
+ panic(`arch/x86_64/atomic_arch.h:4:2: assembler statements not supported`)
+ return t
+}
+
+func a_swap(tls *TLS, p uintptr, v int32) int32 { /* atomic_arch.h:20:19: */
+ panic(`arch/x86_64/atomic_arch.h:22:2: assembler statements not supported`)
+ return v
+}
+
+func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:46:20: */
+ panic(`arch/x86_64/atomic_arch.h:48:2: assembler statements not supported`)
+}
+
+func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic_arch.h:62:20: */
+ panic(`arch/x86_64/atomic_arch.h:64:2: assembler statements not supported`)
+}
+
+func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:112:19: */
+ panic(`arch/x86_64/atomic_arch.h:114:2: assembler statements not supported`)
+ return int32(x)
+}
+
+func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic.h:256:19: */
+ return int32(_sdebruijn328[x&-x*uint32_t(0x076be629)>>27])
+}
+
+var _sdebruijn328 = [32]int8{
+ int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13),
+ int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14),
+} /* atomic.h:261:20 */
+
+type __timer = struct {
+ timerid int32
+ _ [4]byte
+ thread pthread_t
+} /* pthread_impl.h:64:1 */
+
+func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
+ var self uintptr
+ panic(`arch/x86_64/pthread_arch.h:4:2: assembler statements not supported`)
+ return self
+}
+
+func __wake(tls *TLS, addr uintptr, cnt int32, priv int32) { /* pthread_impl.h:155:20: */
+ if priv != 0 {
+ priv = 128
+ }
+ if cnt < 0 {
+ cnt = 0x7fffffff
+ }
+ _ = Bool32(X__syscall3(tls, int64(202), int64(addr), int64(1|priv), int64(cnt)) != int64(-38) || X__syscall3(tls, int64(202), int64(addr), int64(1), int64(cnt)) != 0)
+}
+
+func __futexwait(tls *TLS, addr uintptr, val int32, priv int32) { /* pthread_impl.h:162:20: */
+ if priv != 0 {
+ priv = 128
+ }
+ _ = Bool32(X__syscall4(tls, int64(202), int64(addr), int64(0|priv), int64(val), int64(0)) != int64(-38) || X__syscall4(tls, int64(202), int64(addr), int64(0), int64(val), int64(0)) != 0)
+}
+
+var X__fsmu8 = [51]uint32_t{
+ func() uint32 {
+ if 0x2 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x2)
+ }(), func() uint32 {
+ if 0x3 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x3)
+ }(), func() uint32 {
+ if 0x4 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x4)
+ }(), func() uint32 {
+ if 0x5 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x5)
+ }(), func() uint32 {
+ if 0x6 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x6)
+ }(), func() uint32 {
+ if 0x7 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x7)
+ }(),
+ func() uint32 {
+ if 0x8 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x8)
+ }(), func() uint32 {
+ if 0x9 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x9)
+ }(), func() uint32 {
+ if 0xa < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xa)
+ }(), func() uint32 {
+ if 0xb < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xb)
+ }(), func() uint32 {
+ if 0xc < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xc)
+ }(), func() uint32 {
+ if 0xd < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xd)
+ }(), func() uint32 {
+ if 0xe < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xe)
+ }(), func() uint32 {
+ if 0xf < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xf)
+ }(),
+ func() uint32 {
+ if 0x0+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x0+16)
+ }(), func() uint32 {
+ if 0x1+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x1+16)
+ }(), func() uint32 {
+ if 0x2+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x2+16)
+ }(), func() uint32 {
+ if 0x3+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x3+16)
+ }(), func() uint32 {
+ if 0x4+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x4+16)
+ }(), func() uint32 {
+ if 0x5+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x5+16)
+ }(), func() uint32 {
+ if 0x6+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x6+16)
+ }(), func() uint32 {
+ if 0x7+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x7+16)
+ }(),
+ func() uint32 {
+ if 0x8+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x8+16)
+ }(), func() uint32 {
+ if 0x9+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0x9+16)
+ }(), func() uint32 {
+ if 0xa+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xa+16)
+ }(), func() uint32 {
+ if 0xb+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xb+16)
+ }(), func() uint32 {
+ if 0xc+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xc+16)
+ }(), func() uint32 {
+ if 0xd+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xd+16)
+ }(), func() uint32 {
+ if 0xe+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xe+16)
+ }(), func() uint32 {
+ if 0xf+16 < 2 {
+ return Uint32FromInt32(-1)
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23 | uint32_t(0xf+16)
+ }(),
+ func() uint32 {
+ if 0x0 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x0 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x0), func() uint32 {
+ if 0x1 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x1 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x1), func() uint32 {
+ if 0x2 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x2 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x2), func() uint32 {
+ if 0x3 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x3 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x3), func() uint32 {
+ if 0x4 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x4 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x4), func() uint32 {
+ if 0x5 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x5 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x5), func() uint32 {
+ if 0x6 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x6 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x6), func() uint32 {
+ if 0x7 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x7 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x7),
+ func() uint32 {
+ if 0x8 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x8 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x8), func() uint32 {
+ if 0x9 == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x9 == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0x9), func() uint32 {
+ if 0xa == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xa == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xa), func() uint32 {
+ if 0xb == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xb == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xb), func() uint32 {
+ if 0xc == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xc == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xc), func() uint32 {
+ if 0xd == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xd == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xd), func() uint32 {
+ if 0xe == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xe == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xe), func() uint32 {
+ if 0xf == 0 {
+ return func() uint32 {
+ if Int32(0xa0) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0xa0))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0xf == 0xd {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(0xf),
+ func() uint32 {
+ if 0x0 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x0 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x0 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x0), func() uint32 {
+ if 0x1 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x1 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x1 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x1), func() uint32 {
+ if 0x2 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x2 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x2 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x2), func() uint32 {
+ if 0x3 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x3 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x3 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x3), func() uint32 {
+ if 0x4 >= 5 {
+ return uint32(0)
+ }
+ return func() uint32 {
+ if 0x4 == 0 {
+ return func() uint32 {
+ if Int32(0x90) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x90))
+ }() << 23
+ }
+ return func() uint32 {
+ if 0x4 == 4 {
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0x90))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }
+ return func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }() << 23
+ }()
+ }()
+ }() | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>6 | uint32_t(func() uint32 {
+ if Int32(0x80) == Int32(0x80) {
+ return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0))
+ }
+ return Uint32(Uint32(0) - Uint32FromInt32(0x80))
+ }()<<23)>>12 | uint32_t(0x4),
+} /* internal.c:18:16 */
+
+type wint_t = uint32 /* alltypes.h:198:18 */
+
+type wctype_t = uint64 /* alltypes.h:203:23 */
+
+type __mbstate_t = struct {
+ __opaque1 uint32
+ __opaque2 uint32
+} /* alltypes.h:337:9 */
+
+type mbstate_t = __mbstate_t /* alltypes.h:337:63 */
+
+func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var c uint32
+ var s uintptr
+ var N uint32
+ // var dummy wchar_t at bp, 4
+ s = src
+ N = uint32(n)
+
+ if !!(st != 0) {
+ goto __1
+ }
+ st = uintptr(unsafe.Pointer(&_sinternal_state))
+__1:
+ ;
+ c = *(*uint32)(unsafe.Pointer(st))
+
+ if !!(s != 0) {
+ goto __2
+ }
+ if !(c != 0) {
+ goto __4
+ }
+ goto ilseq
+__4:
+ ;
+ return uint64(0)
+ goto __3
+__2:
+ if !!(wc != 0) {
+ goto __5
+ }
+ wc = bp /* &dummy */
+__5:
+ ;
+__3:
+ ;
+
+ if !!(n != 0) {
+ goto __6
+ }
+ return Uint64FromInt32(-2)
+__6:
+ ;
+ if !!(c != 0) {
+ goto __7
+ }
+ if !(int32(*(*uint8)(unsafe.Pointer(s))) < 0x80) {
+ goto __8
+ }
+ return BoolUint64(!!(AssignPtrInt32(wc, wchar_t(*(*uint8)(unsafe.Pointer(s)))) != 0))
+__8:
+ ;
+ if !(func() int32 {
+ if !!(int32(*(*uintptr)(unsafe.Pointer((*__pthread)(unsafe.Pointer(__pthread_self(tls))).locale))) != 0) {
+ return 4
+ }
+ return 1
+ }() == 1) {
+ goto __9
+ }
+ *(*wchar_t)(unsafe.Pointer(wc)) = 0xdfff & int32(int8(*(*uint8)(unsafe.Pointer(s))))
+ return 1
+__9:
+ ;
+ if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0xc2 > 0xf4-0xc2) {
+ goto __10
+ }
+ goto ilseq
+__10:
+ ;
+ c = X__fsmu8[uint32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0xc2]
+ n--
+__7:
+ ;
+
+ if !(n != 0) {
+ goto __11
+ }
+ if !((int32(*(*uint8)(unsafe.Pointer(s)))>>3-0x10|(int32(*(*uint8)(unsafe.Pointer(s)))>>3+int32_t(c)>>26))&CplInt32(7) != 0) {
+ goto __12
+ }
+ goto ilseq
+__12:
+ ;
+loop:
+ c = c<<6 | uint32(int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0x80)
+ n--
+ if !!(c&(uint32(1)<<31) != 0) {
+ goto __13
+ }
+ *(*uint32)(unsafe.Pointer(st)) = uint32(0)
+ *(*wchar_t)(unsafe.Pointer(wc)) = wchar_t(c)
+ return size_t(N) - n
+__13:
+ ;
+ if !(n != 0) {
+ goto __14
+ }
+ if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0x80 >= uint32(0x40)) {
+ goto __15
+ }
+ goto ilseq
+__15:
+ ;
+ goto loop
+__14:
+ ;
+__11:
+ ;
+
+ *(*uint32)(unsafe.Pointer(st)) = c
+ return Uint64FromInt32(-2)
+ilseq:
+ *(*uint32)(unsafe.Pointer(st)) = uint32(0)
+ *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84
+ return Uint64FromInt32(-1)
+}
+
+var _sinternal_state uint32 /* mbrtowc.c:8:18: */
+
+func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
+ return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
+}
+
+type imaxdiv_t = struct {
+ quot intmax_t
+ rem intmax_t
+} /* inttypes.h:14:40 */
+
+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
+} /* socket.h:22:1 */
+
+type cmsghdr = struct {
+ cmsg_len socklen_t
+ __pad1 int32
+ cmsg_level int32
+ cmsg_type int32
+} /* socket.h:44:1 */
+
+type linger = struct {
+ l_onoff int32
+ l_linger int32
+} /* socket.h:74:1 */
+
+type sockaddr = struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+} /* socket.h:367:1 */
+
+type sockaddr_storage = struct {
+ ss_family sa_family_t
+ __ss_padding [118]int8
+ __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 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
+} /* in.h:16:1 */
+
+type in6_addr = struct {
+ __in6_union struct {
+ _ [0]uint32
+ __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
+ }
+ }
+ sin6_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
+ }
+ }
+ ipv6mr_interface uint32
+} /* in.h:42:1 */
+
+type ip_opts = struct {
+ ip_dst struct{ s_addr in_addr_t }
+ ip_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 }
+} /* 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
+} /* 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 }
+} /* 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 }
+} /* 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
+ }
+} /* 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
+ }
+} /* 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
+ }
+} /* 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 }
+} /* in.h:297:1 */
+
+type in6_pktinfo = struct {
+ ipi6_addr struct {
+ __in6_union struct {
+ _ [0]uint32
+ __s6_addr [16]uint8_t
+ }
+ }
+ ipi6_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
+ }
+ }
+ sin6_scope_id uint32_t
+ }
+ ip6m_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
+} /* 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
+} /* netdb.h:62:1 */
+
+type hostent = struct {
+ h_name uintptr
+ h_aliases uintptr
+ h_addrtype int32
+ h_length int32
+ h_addr_list uintptr
+} /* netdb.h:69:1 */
+
+type servent = struct {
+ s_name uintptr
+ s_aliases uintptr
+ s_port int32
+ _ [4]byte
+ s_proto uintptr
+} /* netdb.h:78:1 */
+
+type protoent = struct {
+ p_name uintptr
+ p_aliases uintptr
+ p_proto int32
+ _ [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
+} /* 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
+ }
+ _ [12]byte
+} /* lookup.h:10:1 */
+
+type address = struct {
+ family int32
+ scopeid uint32
+ addr [16]uint8_t
+ sortkey int32
+} /* lookup.h:20:1 */
+
+type service = struct {
+ port uint16_t
+ proto uint8
+ socktype 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
+} /* lookup.h:34:1 */
+
+func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
+ var cnt size_t
+ cnt = uint64(1)
+__1:
+ if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) {
+ goto __3
+ }
+ goto __2
+__2:
+ cnt++
+ p = (*addrinfo)(unsafe.Pointer(p)).ai_next
+ goto __1
+ goto __3
+__3:
+ ;
+ var b uintptr = p - uintptr(uint64(uintptr(0)))
+ b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot)
+ //TODO LOCK(b->lock);
+ if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) {
+ Xfree(tls, b)
+ }
+ //TODO else UNLOCK(b->lock);
+}
+
+func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
+ 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)).ai_family
+ flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags
+ proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol
+ socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_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)).slot = 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)).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 {
+ 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
+ if k != 0 {
+ (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88
+ }
+ switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family {
+ 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)
+ 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
+ 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)).ref = int16(nais)
+ *(*uintptr)(unsafe.Pointer(res)) = out
+ return 0
+}
+
+type ucred = struct {
+ pid pid_t
+ uid uid_t
+ gid 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
+} /* socket.h:63:1 */
+
+func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
+ 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 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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
+ bp := tls.Alloc(28)
+ defer tls.Free(28)
+
+ //TODO union {
+ //TODO struct sockaddr_in sin;
+ //TODO struct sockaddr_in6 sin6;
+ //TODO } sa = { .sin.sin_family = af };
+ *(*struct {
+ sin sockaddr_in
+ _ [12]byte
+ })(unsafe.Pointer(bp)) = struct {
+ sin sockaddr_in
+ _ [12]byte
+ }{} //TODO-
+ (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO-
+ var sl socklen_t
+ if af == 10 {
+ sl = uint32(unsafe.Sizeof(sockaddr_in6{}))
+ } else {
+ sl = uint32(unsafe.Sizeof(sockaddr_in{}))
+ }
+ var i int32
+
+ *(*uintptr)(unsafe.Pointer(res)) = uintptr(0)
+
+ // Load address argument into sockaddr structure
+ if af == 10 && l == socklen_t(16) {
+ Xmemcpy(tls, bp+8, a, uint64(16))
+ } else if af == 2 && l == socklen_t(4) {
+ Xmemcpy(tls, bp+4, a, uint64(4))
+ } else {
+ *(*int32)(unsafe.Pointer(err)) = 3
+ return 22
+ }
+
+ // Align buffer and check for space for pointers and ip address
+ i = int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)))
+ if !(i != 0) {
+ i = int32(unsafe.Sizeof(uintptr(0)))
+ }
+ if buflen <= uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))-uint64(i)+uint64(l) {
+ return 34
+ }
+ 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
+ buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0))))
+ (*hostent)(unsafe.Pointer(h)).h_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))
+ 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)
+
+ switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) {
+ case -3:
+ *(*int32)(unsafe.Pointer(err)) = 2
+ return 11
+ case -12:
+ return 34
+ default:
+ fallthrough
+ case -10:
+ fallthrough
+ case -11:
+ fallthrough
+ case -4:
+ *(*int32)(unsafe.Pointer(err)) = 3
+ return *(*int32)(unsafe.Pointer(X___errno_location(tls)))
+ case 0:
+ 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))
+ *(*uintptr)(unsafe.Pointer(res)) = h
+ return 0
+}
+
+func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
+ return Xgethostbyname2(tls, name, 2)
+}
+
+func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
+ 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)).h_addrtype = af
+ (*hostent)(unsafe.Pointer(h)).h_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)).h_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)).h_aliases = buf
+ buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0))))
+ (*hostent)(unsafe.Pointer(h)).h_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)).h_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))
+
+ 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))
+ } else {
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0)
+ }
+
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0)
+
+ *(*uintptr)(unsafe.Pointer(res)) = h
+ return 0
+}
+
+func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
+ return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
+}
+
+type if_nameindex = struct {
+ if_index uint32
+ _ [4]byte
+ if_name uintptr
+} /* if.h:12:1 */
+
+type ifaddr = struct {
+ ifa_addr struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+ }
+ ifa_ifu struct {
+ ifu_broadaddr struct {
+ sa_family sa_family_t
+ sa_data [14]int8
+ }
+ }
+ ifa_ifp uintptr
+ ifa_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
+} /* 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
+ }
+ _ [8]byte
+ }
+} /* if.h:76:1 */
+
+type ifconf = struct {
+ ifc_len int32
+ _ [4]byte
+ ifc_ifcu struct{ ifcu_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
+} /* nameser.h:39:9 */
+
+type ns_msg = __ns_msg /* nameser.h:46:3 */
+
+type _ns_flagdata = struct {
+ mask int32
+ shift 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
+} /* 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 {
+ name [1025]int8
+ alg [1025]int8
+ _ [6]byte
+ data uintptr
+ len int32
+ _ [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
+} /* 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 {
+ _ [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 */
+} /* 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
+ }
+} /* resolv.h:26:9 */
+
+// unused; purely for broken apps
+type res_state = uintptr /* resolv.h:62:3 */
+
+type res_sym = struct {
+ number int32
+ _ [4]byte
+ name uintptr
+ humanname 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+25,
+ 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+50)
+}
+
+var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 59)) /* 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+76, ts+87)
+ if !(f != 0) {
+ return
+ }
+ if family == 2 {
+ Xmemcpy(tls, bp+uintptr(12), a, uint64(4))
+ Xmemcpy(tls, bp, ts+90, 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)).family == 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)
+ }
+
+ if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != 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);
+}
+
+func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
+ bp := tls.Alloc(347)
+ defer tls.Free(347)
+
+ // var ptr [78]int8 at bp, 78
+
+ // var buf [256]int8 at bp+78, 256
+
+ // var num [13]int8 at bp+334, 13
+
+ var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family)
+ var a uintptr
+ var scopeid uint32
+
+ switch af {
+ case 2:
+ a = sa1 + 4
+ if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{})) {
+ return -6
+ }
+ mkptr4(tls, bp, a)
+ scopeid = uint32(0)
+ break
+ case 10:
+ a = sa1 + 8
+ if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) {
+ return -6
+ }
+ if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
+ mkptr6(tls, bp, a)
+ } else {
+ mkptr4(tls, bp, a+uintptr(12))
+ }
+ scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id
+ break
+ default:
+ return -6
+ }
+
+ if node != 0 && nodelen != 0 {
+ *(*int8)(unsafe.Pointer(bp + 78)) = int8(0)
+ if !(flags&0x01 != 0) {
+ reverse_hosts(tls, bp+78, a, scopeid, af)
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) && !(flags&0x01 != 0) {
+ Xabort(tls) //TODO-
+ // unsigned char query[18+PTR_MAX], reply[512];
+ // int qlen = __res_mkquery(0, ptr, 1, RR_PTR,
+ // 0, 0, 0, query, sizeof query);
+ // query[3] = 0; /* don't need AD flag */
+ // int rlen = __res_send(query, qlen, reply, sizeof reply);
+ // buf[0] = 0;
+ // if (rlen > 0)
+ // __dns_parse(reply, rlen, dns_parse_callback, buf);
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) {
+ if flags&0x08 != 0 {
+ return -2
+ }
+ Xinet_ntop(tls, af, a, bp+78, uint32(unsafe.Sizeof([256]int8{})))
+ if scopeid != 0 {
+ Xabort(tls) //TODO-
+ // char *p = 0, tmp[IF_NAMESIZE+1];
+ // if (!(flags & NI_NUMERICSCOPE) &&
+ // (IN6_IS_ADDR_LINKLOCAL(a) ||
+ // IN6_IS_ADDR_MC_LINKLOCAL(a)))
+ // p = if_indextoname(scopeid, tmp+1);
+ // if (!p)
+ // p = itoa(num, scopeid);
+ // *--p = '%';
+ // strcat(buf, p);
+ }
+ }
+ if Xstrlen(tls, bp+78) >= size_t(nodelen) {
+ return -12
+ }
+ Xstrcpy(tls, node, bp+78)
+ }
+
+ if serv != 0 && servlen != 0 {
+ var p uintptr = bp + 78 /* buf */
+ var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port))
+ *(*int8)(unsafe.Pointer(bp + 78)) = int8(0)
+ if !(flags&0x02 != 0) {
+ reverse_services(tls, bp+78, port, flags&0x10)
+ }
+ if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
+ p = itoa(tls, bp+334, uint32(port))
+ }
+ if Xstrlen(tls, p) >= size_t(servlen) {
+ return -12
+ }
+ Xstrcpy(tls, serv, p)
+ }
+
+ return 0
+}
+
+var Xh_errno int32 /* h_errno.c:4:5: */
+
+func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ return uintptr(unsafe.Pointer(&Xh_errno))
+}
+
+func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
+ 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+103, 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+90, uint64(12)) != 0 {
+ Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
+ ts+115,
+ 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+139,
+ 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+169))
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
+ 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)).family = 2
+ (*address)(unsafe.Pointer(buf)).scopeid = 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)).family = 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)).scopeid = uint32(scopeid)
+ return 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.family = 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
+ *(*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+76, ts+87)
+ 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 {
+ addrs uintptr
+ canon uintptr
+ cnt int32
+ _ [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 {
+ addr [16]uint8
+ len uint8
+ mask uint8
+ prec uint8
+ label 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)},
+ // Last rule must match all addresses to stop loop.
+ {addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: 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 {
+ 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)))) {
+ 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))).label)
+}
+
+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)).sortkey - (*address)(unsafe.Pointer(a)).sortkey
+}
+
+func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
+ 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)).family != 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)).family
+ 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_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)}
+ 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+90, uint64(12))
+ Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
+ Xmemcpy(tls, bp+8,
+ ts+90, 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)).label)
+ var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec)
+ 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)).sortkey = 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: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
+ 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)).port = uint16_t(0)
+ (*service)(unsafe.Pointer(buf)).proto = uint8(proto)
+ (*service)(unsafe.Pointer(buf)).socktype = 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)).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)
+ }
+ 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)
+ }
+ 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 temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
+ x = x ^ x>>11
+ x = x ^ x<<7&0x9D2C5680
+ x = x ^ x<<15&0xEFC60000
+ x = x ^ x>>18
+ return x
+}
+
+func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
+ return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
+}
+
+func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
+ var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
+ if owner&CplInt32(0x40000000) == tid {
+ return 0
+ }
+ owner = a_cas(tls, f+140, 0, tid)
+ if !(owner != 0) {
+ return 1
+ }
+ for AssignInt32(&owner, a_cas(tls, f+140, 0, tid|0x40000000)) != 0 {
+ if owner&0x40000000 != 0 || a_cas(tls, f+140, owner, owner|0x40000000) == owner {
+ __futexwait(tls, f+140, owner|0x40000000, 1)
+ }
+ }
+ return 1
+}
+
+func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ if a_swap(tls, f+140, 0)&0x40000000 != 0 {
+ __wake(tls, f+140, 1, 1)
+ }
+}
+
+func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
+ if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
+ (*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))
+ }
+ (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0)))
+ if (*FILE)(unsafe.Pointer(f)).flags&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 {
+ return -1
+ }
+ return 0
+}
+
+func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
+ 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)).read})).f(tls, f, bp, uint64(1)) == uint64(1) {
+ return int32(*(*uint8)(unsafe.Pointer(bp)))
+ }
+ return -1
+}
+
+func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
+ var ret int32
+ var ap va_list
+ _ = ap
+ ap = va
+ ret = Xvsscanf(tls, s, fmt, ap)
+ _ = ap
+ return ret
+}
+
+type wctrans_t = uintptr /* wctype.h:20:19 */
+
+func store_int(tls *TLS, dest uintptr, size int32, i uint64) { /* vfscanf.c:22:13: */
+ if !(dest != 0) {
+ return
+ }
+ switch size {
+ case -2:
+ *(*int8)(unsafe.Pointer(dest)) = int8(i)
+ break
+ case -1:
+ *(*int16)(unsafe.Pointer(dest)) = int16(i)
+ break
+ case 0:
+ *(*int32)(unsafe.Pointer(dest)) = int32(i)
+ break
+ case 1:
+ *(*int64)(unsafe.Pointer(dest)) = int64(i)
+ break
+ case 3:
+ *(*int64)(unsafe.Pointer(dest)) = int64(i)
+ break
+ }
+}
+
+func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
+ var p uintptr
+ var i uint32
+ var ap2 va_list
+ _ = ap2
+ ap2 = ap
+ for i = n; i > uint32(1); i-- {
+ VaUintptr(&ap2)
+ }
+ p = VaUintptr(&ap2)
+ _ = ap2
+ return p
+}
+
+func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
+ bp := tls.Alloc(276)
+ defer tls.Free(276)
+
+ var width int32
+ var size int32
+ var alloc int32
+ var base int32
+ var p uintptr
+ var c int32
+ var t int32
+ var s uintptr
+ var wcs uintptr
+ // var st mbstate_t at bp+268, 8
+
+ var dest uintptr
+ var invert int32
+ var matches int32
+ var x uint64
+ var y float64
+ var pos off_t
+ // var scanset [257]uint8 at bp, 257
+
+ var i size_t
+ var k size_t
+ // var wc wchar_t at bp+260, 4
+
+ var __need_unlock int32
+ var tmp uintptr
+ var tmp1 uintptr
+ alloc = 0
+ dest = uintptr(0)
+ matches = 0
+ pos = int64(0)
+ __need_unlock = 0
+
+ if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) {
+ goto __1
+ }
+ X__toread(tls, f)
+__1:
+ ;
+ if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) {
+ goto __2
+ }
+ goto input_fail
+__2:
+ ;
+
+ p = fmt
+__3:
+ if !(*(*uint8)(unsafe.Pointer(p)) != 0) {
+ goto __5
+ }
+
+ alloc = 0
+
+ if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0) {
+ goto __6
+ }
+__7:
+ if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + 1)))) != 0) {
+ goto __8
+ }
+ p++
+ goto __7
+__8:
+ ;
+ X__shlim(tls, f, int64(0))
+__9:
+ if !(__isspace(tls, 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))))
+ }
+ return X__shgetc(tls, f)
+ }()) != 0) {
+ goto __10
+ }
+ goto __9
+__10:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ goto __4
+__6:
+ ;
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) != '%' || int32(*(*uint8)(unsafe.Pointer(p + 1))) == '%') {
+ goto __11
+ }
+ X__shlim(tls, f, int64(0))
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '%') {
+ goto __12
+ }
+ p++
+__14:
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }())) != 0) {
+ goto __15
+ }
+ goto __14
+__15:
+ ;
+ goto __13
+__12:
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }()
+__13:
+ ;
+ if !(c != int32(*(*uint8)(unsafe.Pointer(p)))) {
+ goto __16
+ }
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if !(c < 0) {
+ goto __17
+ }
+ goto input_fail
+__17:
+ ;
+ goto match_fail
+__16:
+ ;
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ goto __4
+__11:
+ ;
+
+ p++
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '*') {
+ goto __18
+ }
+ dest = uintptr(0)
+ p++
+ goto __19
+__18:
+ if !(func() int32 {
+ if 0 != 0 {
+ return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p))))
+ }
+ return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10))
+ }() != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == '$') {
+ goto __20
+ }
+ dest = arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-'0'))
+ p += uintptr(2)
+ goto __21
+__20:
+ dest = VaUintptr(&ap)
+__21:
+ ;
+__19:
+ ;
+
+ width = 0
+__22:
+ if !(func() int32 {
+ if 0 != 0 {
+ return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p))))
+ }
+ return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10))
+ }() != 0) {
+ goto __24
+ }
+ width = 10*width + int32(*(*uint8)(unsafe.Pointer(p))) - '0'
+ goto __23
+__23:
+ p++
+ goto __22
+ goto __24
+__24:
+ ;
+
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'm') {
+ goto __25
+ }
+ wcs = uintptr(0)
+ s = uintptr(0)
+ alloc = BoolInt32(!!(dest != 0))
+ p++
+ goto __26
+__25:
+ alloc = 0
+__26:
+ ;
+
+ size = 0
+ switch int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1)))) {
+ case 'h':
+ goto __28
+ case 'l':
+ goto __29
+ case 'j':
+ goto __30
+ case 'z':
+ goto __31
+ case 't':
+ goto __32
+ case 'L':
+ goto __33
+ case 'd':
+ goto __34
+ case 'i':
+ goto __35
+ case 'o':
+ goto __36
+ case 'u':
+ goto __37
+ case 'x':
+ goto __38
+ case 'a':
+ goto __39
+ case 'e':
+ goto __40
+ case 'f':
+ goto __41
+ case 'g':
+ goto __42
+ case 'A':
+ goto __43
+ case 'E':
+ goto __44
+ case 'F':
+ goto __45
+ case 'G':
+ goto __46
+ case 'X':
+ goto __47
+ case 's':
+ goto __48
+ case 'c':
+ goto __49
+ case '[':
+ goto __50
+ case 'S':
+ goto __51
+ case 'C':
+ goto __52
+ case 'p':
+ goto __53
+ case 'n':
+ goto __54
+ default:
+ goto __55
+ }
+ goto __27
+__28:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'h') {
+ goto __56
+ }
+ p++
+ size = -2
+ goto __57
+__56:
+ size = -1
+__57:
+ ;
+ goto __27
+__29:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'l') {
+ goto __58
+ }
+ p++
+ size = 3
+ goto __59
+__58:
+ size = 1
+__59:
+ ;
+ goto __27
+__30:
+ size = 3
+ goto __27
+__31:
+__32:
+ size = 1
+ goto __27
+__33:
+ size = 2
+ goto __27
+__34:
+__35:
+__36:
+__37:
+__38:
+__39:
+__40:
+__41:
+__42:
+__43:
+__44:
+__45:
+__46:
+__47:
+__48:
+__49:
+__50:
+__51:
+__52:
+__53:
+__54:
+ p--
+ goto __27
+__55:
+ goto fmt_fail
+__27:
+ ;
+
+ t = int32(*(*uint8)(unsafe.Pointer(p)))
+
+ // C or S
+ if !(t&0x2f == 3) {
+ goto __60
+ }
+ t = t | 32
+ size = 1
+__60:
+ ;
+
+ switch t {
+ case 'c':
+ goto __62
+ case '[':
+ goto __63
+ case 'n':
+ goto __64
+ default:
+ goto __65
+ }
+ goto __61
+__62:
+ if !(width < 1) {
+ goto __66
+ }
+ width = 1
+__66:
+ ;
+__63:
+ goto __61
+__64:
+ store_int(tls, dest, size, uint64(pos))
+ // do not increment match count, etc!
+ goto __4
+__65:
+ X__shlim(tls, f, int64(0))
+__67:
+ if !(__isspace(tls, 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))))
+ }
+ return X__shgetc(tls, f)
+ }()) != 0) {
+ goto __68
+ }
+ goto __67
+__68:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+__61:
+ ;
+
+ X__shlim(tls, f, int64(width))
+ 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))))
+ }
+ return X__shgetc(tls, f)
+ }() < 0) {
+ goto __69
+ }
+ goto input_fail
+__69:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+
+ switch t {
+ case 's':
+ goto __71
+ case 'c':
+ goto __72
+ case '[':
+ goto __73
+ case 'p':
+ goto __74
+ case 'X':
+ goto __75
+ case 'x':
+ goto __76
+ case 'o':
+ goto __77
+ case 'd':
+ goto __78
+ case 'u':
+ goto __79
+ case 'i':
+ goto __80
+ case 'a':
+ goto __81
+ case 'A':
+ goto __82
+ case 'e':
+ goto __83
+ case 'E':
+ goto __84
+ case 'f':
+ goto __85
+ case 'F':
+ goto __86
+ case 'g':
+ goto __87
+ case 'G':
+ goto __88
+ }
+ goto __70
+__71:
+__72:
+__73:
+ if !(t == 'c' || t == 's') {
+ goto __89
+ }
+ Xmemset(tls, bp, -1, uint64(unsafe.Sizeof([257]uint8{})))
+ *(*uint8)(unsafe.Pointer(bp)) = uint8(0)
+ if !(t == 's') {
+ goto __91
+ }
+ *(*uint8)(unsafe.Pointer(bp + 10)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 11)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 12)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 13)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 14)) = uint8(0)
+ *(*uint8)(unsafe.Pointer(bp + 33)) = uint8(0)
+__91:
+ ;
+ goto __90
+__89:
+ if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1)))) == '^') {
+ goto __92
+ }
+ p++
+ invert = 1
+ goto __93
+__92:
+ invert = 0
+__93:
+ ;
+ Xmemset(tls, bp, invert, uint64(unsafe.Sizeof([257]uint8{})))
+ *(*uint8)(unsafe.Pointer(bp)) = uint8(0)
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-') {
+ goto __94
+ }
+ p++
+ *(*uint8)(unsafe.Pointer(bp + 46)) = uint8(1 - invert)
+ goto __95
+__94:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == ']') {
+ goto __96
+ }
+ p++
+ *(*uint8)(unsafe.Pointer(bp + 94)) = uint8(1 - invert)
+__96:
+ ;
+__95:
+ ;
+__97:
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) != ']') {
+ goto __99
+ }
+ if !!(int32(*(*uint8)(unsafe.Pointer(p))) != 0) {
+ goto __100
+ }
+ goto fmt_fail
+__100:
+ ;
+ if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-' && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != ']') {
+ goto __101
+ }
+ c = int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1) + UintptrFromInt32(-1))))
+__102:
+ if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) {
+ goto __104
+ }
+ *(*uint8)(unsafe.Pointer(bp + uintptr(1+c))) = uint8(1 - invert)
+ goto __103
+__103:
+ c++
+ goto __102
+ goto __104
+__104:
+ ;
+__101:
+ ;
+ *(*uint8)(unsafe.Pointer(bp + uintptr(1+int32(*(*uint8)(unsafe.Pointer(p)))))) = uint8(1 - invert)
+ goto __98
+__98:
+ p++
+ goto __97
+ goto __99
+__99:
+ ;
+__90:
+ ;
+ wcs = uintptr(0)
+ s = uintptr(0)
+ i = uint64(0)
+ if t == 'c' {
+ k = uint64(uint32(width) + 1)
+ } else {
+ k = uint64(31)
+ }
+ if !(size == 1) {
+ goto __105
+ }
+ if !(alloc != 0) {
+ goto __107
+ }
+ wcs = Xmalloc(tls, k*size_t(unsafe.Sizeof(wchar_t(0))))
+ if !!(wcs != 0) {
+ goto __109
+ }
+ goto alloc_fail
+__109:
+ ;
+ goto __108
+__107:
+ wcs = dest
+__108:
+ ;
+ *(*mbstate_t)(unsafe.Pointer(bp + 268 /* st */)) = mbstate_t{}
+__110:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __111
+ }
+ switch Xmbrtowc(tls, bp+260, func() uintptr { *(*int8)(unsafe.Pointer(bp + 264)) = int8(c); return bp + 264 }(), uint64(1), bp+268 /* &st */) {
+ case Uint64FromInt32(-1):
+ goto __113
+ case Uint64FromInt32(-2):
+ goto __114
+ }
+ goto __112
+__113:
+ goto input_fail
+__114:
+ goto __110
+__112:
+ ;
+ if !(wcs != 0) {
+ goto __115
+ }
+ *(*wchar_t)(unsafe.Pointer(wcs + uintptr(PostIncUint64(&i, 1))*4)) = *(*wchar_t)(unsafe.Pointer(bp + 260 /* wc */))
+__115:
+ ;
+ if !(alloc != 0 && i == k) {
+ goto __116
+ }
+ k = k + (k + uint64(1))
+ tmp = Xrealloc(tls, wcs, k*size_t(unsafe.Sizeof(wchar_t(0))))
+ if !!(tmp != 0) {
+ goto __117
+ }
+ goto alloc_fail
+__117:
+ ;
+ wcs = tmp
+__116:
+ ;
+ goto __110
+__111:
+ ;
+ if !!(Xmbsinit(tls, bp+268) != 0) {
+ goto __118
+ }
+ goto input_fail
+__118:
+ ;
+ goto __106
+__105:
+ if !(alloc != 0) {
+ goto __119
+ }
+ s = Xmalloc(tls, k)
+ if !!(s != 0) {
+ goto __121
+ }
+ goto alloc_fail
+__121:
+ ;
+__122:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __123
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c)
+ if !(i == k) {
+ goto __124
+ }
+ k = k + (k + uint64(1))
+ tmp1 = Xrealloc(tls, s, k)
+ if !!(tmp1 != 0) {
+ goto __125
+ }
+ goto alloc_fail
+__125:
+ ;
+ s = tmp1
+__124:
+ ;
+ goto __122
+__123:
+ ;
+ goto __120
+__119:
+ if !(AssignUintptr(&s, dest) != 0) {
+ goto __126
+ }
+__128:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __129
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c)
+ goto __128
+__129:
+ ;
+ goto __127
+__126:
+__130:
+ if !(*(*uint8)(unsafe.Pointer(bp + uintptr(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))))
+ }
+ return X__shgetc(tls, f)
+ }())+1))) != 0) {
+ goto __131
+ }
+ goto __130
+__131:
+ ;
+__127:
+ ;
+__120:
+ ;
+__106:
+ ;
+ if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).rpos--
+ } else {
+ }
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __132
+ }
+ goto match_fail
+__132:
+ ;
+ if !(t == 'c' && (*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != off_t(width)) {
+ goto __133
+ }
+ goto match_fail
+__133:
+ ;
+ if !(alloc != 0) {
+ goto __134
+ }
+ if !(size == 1) {
+ goto __135
+ }
+ *(*uintptr)(unsafe.Pointer(dest)) = wcs
+ goto __136
+__135:
+ *(*uintptr)(unsafe.Pointer(dest)) = s
+__136:
+ ;
+__134:
+ ;
+ if !(t != 'c') {
+ goto __137
+ }
+ if !(wcs != 0) {
+ goto __138
+ }
+ *(*wchar_t)(unsafe.Pointer(wcs + uintptr(i)*4)) = 0
+__138:
+ ;
+ if !(s != 0) {
+ goto __139
+ }
+ *(*int8)(unsafe.Pointer(s + uintptr(i))) = int8(0)
+__139:
+ ;
+__137:
+ ;
+ goto __70
+__74:
+__75:
+__76:
+ base = 16
+ goto int_common
+__77:
+ base = 8
+ goto int_common
+__78:
+__79:
+ base = 10
+ goto int_common
+__80:
+ base = 0
+int_common:
+ x = X__intscan(tls, f, uint32(base), 0, 2*uint64(0x7fffffffffffffff)+uint64(1))
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __140
+ }
+ goto match_fail
+__140:
+ ;
+ if !(t == 'p' && dest != 0) {
+ goto __141
+ }
+ *(*uintptr)(unsafe.Pointer(dest)) = uintptr(uintptr_t(x))
+ goto __142
+__141:
+ store_int(tls, dest, size, x)
+__142:
+ ;
+ goto __70
+__81:
+__82:
+__83:
+__84:
+__85:
+__86:
+__87:
+__88:
+ y = X__floatscan(tls, f, size, 0)
+ if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) {
+ goto __143
+ }
+ goto match_fail
+__143:
+ ;
+ if !(dest != 0) {
+ goto __144
+ }
+ switch size {
+ case 0:
+ goto __146
+ case 1:
+ goto __147
+ case 2:
+ goto __148
+ }
+ goto __145
+__146:
+ *(*float32)(unsafe.Pointer(dest)) = float32(y)
+ goto __145
+__147:
+ *(*float64)(unsafe.Pointer(dest)) = y
+ goto __145
+__148:
+ *(*float64)(unsafe.Pointer(dest)) = y
+ goto __145
+__145:
+ ;
+__144:
+ ;
+ goto __70
+__70:
+ ;
+
+ pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1)
+ if !(dest != 0) {
+ goto __149
+ }
+ matches++
+__149:
+ ;
+ goto __4
+__4:
+ p++
+ goto __3
+ goto __5
+__5:
+ ;
+ if !(0 != 0) {
+ goto __150
+ }
+fmt_fail:
+alloc_fail:
+input_fail:
+ if !!(matches != 0) {
+ goto __151
+ }
+ matches--
+__151:
+ ;
+match_fail:
+ if !(alloc != 0) {
+ goto __152
+ }
+ Xfree(tls, s)
+ Xfree(tls, wcs)
+__152:
+ ;
+__150:
+ ;
+__153:
+ if !(__need_unlock != 0) {
+ goto __156
+ }
+ X__unlockfile(tls, f)
+__156:
+ ;
+ goto __154
+__154:
+ if 0 != 0 {
+ goto __153
+ }
+ goto __155
+__155:
+ ;
+ return matches
+}
+
+func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vsscanf.c:4:15: */
+ var src uintptr = (*FILE)(unsafe.Pointer(f)).cookie
+ var k size_t = len + uint64(256)
+ var end uintptr = Xmemchr(tls, src, 0, k)
+ if end != 0 {
+ k = size_t((int64(end) - int64(src)) / 1)
+ }
+ if k < len {
+ len = k
+ }
+ Xmemcpy(tls, buf, src, len)
+ (*FILE)(unsafe.Pointer(f)).rpos = src + uintptr(len)
+ (*FILE)(unsafe.Pointer(f)).rend = src + uintptr(k)
+ (*FILE)(unsafe.Pointer(f)).cookie = src + uintptr(k)
+ return len
+}
+
+func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
+ bp := tls.Alloc(232)
+ defer tls.Free(232)
+
+ *(*FILE)(unsafe.Pointer(bp /* f */)) = FILE{read: *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*TLS, uintptr, uintptr, size_t) size_t
+ }{string_read})), buf: s, lock: -1, cookie: s}
+ return Xvfscanf(tls, bp, fmt, ap)
+}
+
+func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
+ 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)).buf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).rend = 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
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ return float32(strtox(tls, s, p, 0))
+}
+
+func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ return strtox(tls, s, p, 1)
+}
+
+func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
+ 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)).buf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).rend = 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)
+ *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt)
+ }
+ return y
+}
+
+func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ return intmax_t(Xstrtoll(tls, s, p, base))
+}
+
+func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
+ return uintmax_t(Xstrtoull(tls, s, p, base))
+}
+
+func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
+ 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 Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var l size_t = Xstrnlen(tls, d, n)
+ if l == n {
+ return l + Xstrlen(tls, s)
+ }
+ return l + Xstrlcpy(tls, d+uintptr(l), s, n-l)
+}
+
+// Support signed or unsigned plain-char
+
+// Implementation choices...
+
+// Arbitrary numbers...
+
+// POSIX/SUS requirements follow. These numbers come directly
+// from SUS and have nothing to do with the host system.
+
+func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var d0 uintptr
+ var wd uintptr
+ var ws uintptr
+ d0 = d
+
+ if !!(int32(PostDecUint64(&n, 1)) != 0) {
+ goto __1
+ }
+ goto finish
+__1:
+ ;
+ if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) == uintptr_t(d)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1))) {
+ goto __2
+ }
+__3:
+ if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) != 0 && n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) {
+ goto __5
+ }
+ goto __4
+__4:
+ n--
+ s++
+ d++
+ goto __3
+ goto __5
+__5:
+ ;
+ if !(n != 0 && *(*int8)(unsafe.Pointer(s)) != 0) {
+ goto __6
+ }
+ wd = d
+ ws = s
+__7:
+ if !(n >= size_t(unsafe.Sizeof(size_t(0))) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64(Uint64FromInt32(-1))/uint64(255)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64(Uint64FromInt32(-1))/uint64(255)*uint64(255/2+1)) != 0)) {
+ goto __9
+ }
+ *(*size_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws))
+ goto __8
+__8:
+ n = n - size_t(unsafe.Sizeof(size_t(0)))
+ ws += 8
+ wd += 8
+ goto __7
+ goto __9
+__9:
+ ;
+ d = wd
+ s = ws
+__6:
+ ;
+__2:
+ ;
+__10:
+ if !(n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) {
+ goto __12
+ }
+ goto __11
+__11:
+ n--
+ s++
+ d++
+ goto __10
+ goto __12
+__12:
+ ;
+ *(*int8)(unsafe.Pointer(d)) = int8(0)
+finish:
+ return size_t((int64(d)-int64(d0))/1) + Xstrlen(tls, s)
+}
+
+func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
+ var l uintptr = _l
+ var r uintptr = _r
+ if !(int32(PostDecUint64(&n, 1)) != 0) {
+ return 0
+ }
+__1:
+ if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) {
+ goto __3
+ }
+ goto __2
+__2:
+ l++
+ r++
+ n--
+ goto __1
+ goto __3
+__3:
+ ;
+ return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r))))
+}
+
+func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
+ return Xstrncasecmp(tls, l, r, n)
+}
+
+func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
+ var a uintptr = d
+ d += uintptr(Xstrlen(tls, d))
+ for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 {
+ n--
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1)))
+ }
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = int8(0)
+ return a
+}
+
+func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
+ 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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
+ 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 Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
+ if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
+ return uintptr(0)
+ }
+ s += uintptr(Xstrspn(tls, s, sep))
+ if !(int32(*(*int8)(unsafe.Pointer(s))) != 0) {
+ return AssignPtrUintptr(uintptr(unsafe.Pointer(&_sp)), uintptr(0))
+ }
+ _sp = s + uintptr(Xstrcspn(tls, s, sep))
+ if *(*int8)(unsafe.Pointer(_sp)) != 0 {
+ *(*int8)(unsafe.Pointer(PostIncUintptr(&_sp, 1))) = int8(0)
+ } else {
+ _sp = uintptr(0)
+ }
+ return s
+}
+
+var _sp uintptr /* strtok.c:5:14: */
+
+func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return *(*int32)(unsafe.Pointer(a + 6*4))
+}
+
+func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
+ *(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
+ return 0
+}
+
+//
+// int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size)
+// {
+// *size = a->_a_guardsize;
+// return 0;
+// }
+//
+// int pthread_attr_getinheritsched(const pthread_attr_t *restrict a, int *restrict inherit)
+// {
+// *inherit = a->_a_sched;
+// return 0;
+// }
+//
+// int pthread_attr_getschedparam(const pthread_attr_t *restrict a, struct sched_param *restrict param)
+// {
+// param->sched_priority = a->_a_prio;
+// return 0;
+// }
+//
+// int pthread_attr_getschedpolicy(const pthread_attr_t *restrict a, int *restrict policy)
+// {
+// *policy = a->_a_policy;
+// return 0;
+// }
+//
+// int pthread_attr_getscope(const pthread_attr_t *restrict a, int *restrict scope)
+// {
+// *scope = PTHREAD_SCOPE_SYSTEM;
+// return 0;
+// }
+//
+// int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size)
+// {
+// if (!a->_a_stackaddr)
+// return EINVAL;
+// *size = a->_a_stacksize;
+// *addr = (void *)(a->_a_stackaddr - *size);
+// return 0;
+// }
+//
+// int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size)
+// {
+// *size = a->_a_stacksize;
+// return 0;
+// }
+//
+// int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = !!a->__attr;
+// return 0;
+// }
+//
+// int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk)
+// {
+// *clk = a->__attr & 0x7fffffff;
+// return 0;
+// }
+//
+// int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr>>31;
+// return 0;
+// }
+//
+// int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)
+// {
+// *protocol = PTHREAD_PRIO_NONE;
+// return 0;
+// }
+// int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr / 128U % 2;
+// return 0;
+// }
+//
+// int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *restrict robust)
+// {
+// *robust = a->__attr / 4U % 2;
+// return 0;
+// }
+
+func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
+}
+
+// int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type)
+// {
+// *type = a->__attr & 3;
+// return 0;
+// }
+//
+// int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *restrict pshared)
+// {
+// *pshared = a->__attr[0];
+// return 0;
+// }
+
+func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
+ if uint32(state) > 1 {
+ return 22
+ }
+ *(*int32)(unsafe.Pointer(a + 6*4)) = state
+ return 0
+}
+
+func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
+ return *(*int32)(unsafe.Pointer(m)) & 15
+}
+
+// int __pthread_mutex_lock(pthread_mutex_t *m)
+// {
+// if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL
+// && !a_cas(&m->_m_lock, 0, EBUSY))
+// return 0;
+//
+// return __pthread_mutex_timedlock(m, 0);
+// }
+//
+// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
+
+func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ return 0
+}
+
+func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
+ *(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
+ return 0
+}
+
+func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
+ 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)
+ return 0
+}
+
+func init() {
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&ptable)) + 0)) = uintptr(unsafe.Pointer(&table)) + uintptr(128)*2 // __ctype_b_loc.c:36:45:
+}
+
+var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00.\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_linux_ppc64le.go b/vendor/modernc.org/libc/musl_linux_ppc64le.go
index 03045ca5c..1f5f7f14c 100644
--- a/vendor/modernc.org/libc/musl_linux_ppc64le.go
+++ b/vendor/modernc.org/libc/musl_linux_ppc64le.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:335:9 */
type locale_t = uintptr /* alltypes.h:335:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -571,6 +619,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -593,6 +644,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1356,6 +1410,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1533,6 +1590,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1838,6 +1898,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1849,6 +1912,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1910,10 +1976,16 @@ type lconv = struct {
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: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1938,6 +2010,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1962,28 +2037,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2013,6 +2106,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2049,6 +2145,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3458,6 +3557,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:329:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3581,6 +3683,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3883,6 +3988,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3907,6 +4015,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4111,6 +4222,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4137,6 +4251,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4222,10 +4339,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4252,6 +4375,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4343,6 +4469,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4642,6 +4771,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4742,10 +4874,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4797,6 +4935,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4871,6 +5012,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4968,6 +5112,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5278,6 +5425,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5444,6 +5594,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5577,10 +5730,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5599,12 +5758,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5624,6 +5789,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5632,6 +5800,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5646,6 +5817,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5695,6 +5869,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6570,6 +6747,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6580,6 +6760,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6622,14 +6805,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6651,30 +6843,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6684,6 +6897,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6701,6 +6917,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6772,6 +6991,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6794,10 +7016,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 {
@@ -6809,6 +7037,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6817,6 +7048,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6840,6 +7074,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6859,10 +7096,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6949,6 +7192,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6965,6 +7211,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6973,6 +7222,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6988,15 +7240,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_riscv64.go b/vendor/modernc.org/libc/musl_linux_riscv64.go
index 57470023b..471413925 100644
--- a/vendor/modernc.org/libc/musl_linux_riscv64.go
+++ b/vendor/modernc.org/libc/musl_linux_riscv64.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:341:9 */
type locale_t = uintptr /* alltypes.h:341:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -575,6 +623,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -597,6 +648,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1360,6 +1414,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1537,6 +1594,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1842,6 +1902,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1853,6 +1916,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1914,10 +1980,16 @@ type lconv = struct {
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: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1942,6 +2014,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1966,28 +2041,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2017,6 +2110,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2053,6 +2149,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3443,6 +3542,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:335:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3566,6 +3668,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3868,6 +3973,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3892,6 +4000,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4096,6 +4207,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4122,6 +4236,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4207,10 +4324,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4237,6 +4360,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4328,6 +4454,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4627,6 +4756,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4727,10 +4859,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4782,6 +4920,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4856,6 +4997,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4953,6 +5097,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5263,6 +5410,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5429,6 +5579,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5562,10 +5715,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5584,12 +5743,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5609,6 +5774,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5617,6 +5785,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5631,6 +5802,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5680,6 +5854,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6555,6 +6732,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6565,6 +6745,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6607,14 +6790,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6636,30 +6828,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6669,6 +6882,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6686,6 +6902,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6757,6 +6976,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6779,10 +7001,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 {
@@ -6794,6 +7022,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6802,6 +7033,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6825,6 +7059,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6844,10 +7081,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6934,6 +7177,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6950,6 +7196,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6958,6 +7207,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6973,15 +7225,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_linux_s390x.go b/vendor/modernc.org/libc/musl_linux_s390x.go
index fd790654e..25de30f08 100644
--- a/vendor/modernc.org/libc/musl_linux_s390x.go
+++ b/vendor/modernc.org/libc/musl_linux_s390x.go
@@ -403,6 +403,9 @@ var table = [384]uint16{
var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */
func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&ptable))
}
@@ -415,6 +418,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:330:9 */
type locale_t = uintptr /* alltypes.h:330:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -429,50 +435,86 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -482,6 +524,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -535,6 +580,9 @@ type lldiv_t = struct {
} /* stdlib.h:64:41 */
func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd)
Xfree(tls, dir)
return ret
@@ -571,6 +619,9 @@ type f_owner_ex = struct {
type syscall_arg_t = int64 /* syscall.h:22:14 */
func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var fd int32
var dir uintptr
@@ -593,6 +644,9 @@ type max_align_t = struct {
type dirstream_buf_alignment_check = [1]uint8 /* readdir.c:7:14 */
func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */
+ if __ccgo_strace {
+ trc("tls=%v dir=%v, (%v:)", tls, dir, origin(2))
+ }
var de uintptr
if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end {
@@ -1356,6 +1410,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1533,6 +1590,9 @@ var table1 = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1838,6 +1898,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*FILE)(unsafe.Pointer(f)).shlim = lim
(*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
@@ -1849,6 +1912,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1910,10 +1976,16 @@ type lconv = struct {
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: uint8(255), frac_digits: uint8(255), p_cs_precedes: uint8(255), p_sep_by_space: uint8(255), n_cs_precedes: uint8(255), n_sep_by_space: uint8(255), p_sign_posn: uint8(255), n_sign_posn: uint8(255), int_p_cs_precedes: uint8(255), int_p_sep_by_space: uint8(255), int_n_cs_precedes: uint8(255), int_n_sep_by_space: uint8(255), int_p_sign_posn: uint8(255), int_n_sign_posn: uint8(255)} /* localeconv.c:4:27 */
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&posix_lconv))
}
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -1938,6 +2010,9 @@ func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
}
func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1962,28 +2037,46 @@ func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */
}
func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return X__fpclassify(tls, x)
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xfmod(tls, x, y)
}
func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
return X__builtin_nanf(tls, ts+13)
}
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2013,6 +2106,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2049,6 +2145,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -3414,6 +3513,9 @@ type __mbstate_t = struct {
type mbstate_t = __mbstate_t /* alltypes.h:324:63 */
func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v wc=%v src=%v n=%v st=%v, (%v:)", tls, wc, src, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3537,6 +3639,9 @@ ilseq:
var _sinternal_state uint32 /* mbrtowc.c:8:18: */
func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v st=%v, (%v:)", tls, st, origin(2))
+ }
return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0))
}
@@ -3839,6 +3944,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -3863,6 +3971,9 @@ __3:
}
func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -4067,6 +4178,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4093,6 +4207,9 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
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: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, a, l, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -4178,10 +4295,16 @@ func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf
}
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4208,6 +4331,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -4299,6 +4425,9 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, h, buf, buflen, res, err, origin(2))
+ }
return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err)
}
@@ -4598,6 +4727,9 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
}
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */
+ if __ccgo_strace {
+ trc("tls=%v sa1=%v sl=%v node=%v nodelen=%v serv=%v servlen=%v flags=%v, (%v:)", tls, sa1, sl, node, nodelen, serv, servlen, flags, origin(2))
+ }
bp := tls.Alloc(347)
defer tls.Free(347)
@@ -4698,10 +4830,16 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -4753,6 +4891,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -4827,6 +4968,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -4924,6 +5068,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -5234,6 +5381,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -5400,6 +5550,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -5533,10 +5686,16 @@ func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */
}
func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v seed=%v, (%v:)", tls, seed, origin(2))
+ }
return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2))
}
func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var owner int32 = (*FILE)(unsafe.Pointer(f)).lock
var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid
if owner&CplInt32(0x40000000) == tid {
@@ -5555,12 +5714,18 @@ func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */
}
func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
if a_swap(tls, f+140, 0)&0x40000000 != 0 {
__wake(tls, f+140, 1, 1)
}
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
(*struct {
@@ -5580,6 +5745,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -5588,6 +5756,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -5602,6 +5773,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v va=%v, (%v:)", tls, s, fmt, va, origin(2))
+ }
var ret int32
var ap va_list
_ = ap
@@ -5651,6 +5825,9 @@ func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */
}
func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v fmt=%v ap=%v, (%v:)", tls, f, fmt, ap, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -6526,6 +6703,9 @@ func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vssca
}
func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v fmt=%v ap=%v, (%v:)", tls, s, fmt, ap, origin(2))
+ }
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -6536,6 +6716,9 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -6578,14 +6761,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -6607,30 +6799,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -6640,6 +6853,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var l size_t = Xstrnlen(tls, d, n)
if l == n {
return l + Xstrlen(tls, s)
@@ -6657,6 +6873,9 @@ func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:
// from SUS and have nothing to do with the host system.
func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var d0 uintptr
var wd uintptr
var ws uintptr
@@ -6728,6 +6947,9 @@ finish:
}
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v _l=%v _r=%v n=%v, (%v:)", tls, _l, _r, n, origin(2))
+ }
var l uintptr = _l
var r uintptr = _r
if !(int32(PostDecUint64(&n, 1)) != 0) {
@@ -6750,10 +6972,16 @@ __3:
}
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v l=%v r=%v n=%v loc=%v, (%v:)", tls, l, r, n, loc, origin(2))
+ }
return Xstrncasecmp(tls, l, r, n)
}
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v d=%v s=%v n=%v, (%v:)", tls, d, s, n, origin(2))
+ }
var a uintptr = d
d += uintptr(Xstrlen(tls, d))
for n != 0 && *(*uint8)(unsafe.Pointer(s)) != 0 {
@@ -6765,6 +6993,9 @@ func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -6773,6 +7004,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -6796,6 +7030,9 @@ func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
}
func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v sep=%v, (%v:)", tls, s, sep, origin(2))
+ }
if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) {
return uintptr(0)
}
@@ -6815,10 +7052,16 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
var _sp uintptr /* strtok.c:5:14: */
func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return *(*int32)(unsafe.Pointer(a + 6*4))
}
func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
*(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4))
return 0
}
@@ -6905,6 +7148,9 @@ func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /*
// }
func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3))
}
@@ -6921,6 +7167,9 @@ func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_att
// }
func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v state=%v, (%v:)", tls, a, state, origin(2))
+ }
if uint32(state) > 1 {
return 22
}
@@ -6929,6 +7178,9 @@ func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* p
}
func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v m=%v, (%v:)", tls, m, origin(2))
+ }
return *(*int32)(unsafe.Pointer(m)) & 15
}
@@ -6944,15 +7196,24 @@ func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3
// weak_alias(__pthread_mutex_lock, pthread_mutex_lock);
func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
return 0
}
func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v, (%v:)", tls, a, origin(2))
+ }
*(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{}
return 0
}
func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v type1=%v, (%v:)", tls, a, type1, origin(2))
+ }
if uint32(type1) > uint32(2) {
return 22
}
diff --git a/vendor/modernc.org/libc/musl_netbsd_amd64.go b/vendor/modernc.org/libc/musl_netbsd_amd64.go
index b21d3d946..28a98053d 100644
--- a/vendor/modernc.org/libc/musl_netbsd_amd64.go
+++ b/vendor/modernc.org/libc/musl_netbsd_amd64.go
@@ -860,6 +860,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t1 = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -874,30 +877,51 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t1) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t1) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t1) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
@@ -1615,6 +1639,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1792,6 +1819,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -2097,6 +2127,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -2108,6 +2141,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
var c int32
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 {
@@ -2134,20 +2170,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2177,6 +2225,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2213,6 +2264,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2544,6 +2598,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -2681,6 +2738,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2885,6 +2945,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2911,10 +2974,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2941,6 +3010,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3329,10 +3401,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -3384,6 +3462,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3458,6 +3539,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3555,6 +3639,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -3877,6 +3964,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -4043,6 +4133,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4168,6 +4261,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE1)(unsafe.Pointer(f)).Fmode - 1
if (*FILE1)(unsafe.Pointer(f)).Fwpos != (*FILE1)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4187,6 +4283,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4195,6 +4294,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4209,6 +4311,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -4251,14 +4356,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4280,30 +4394,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -4313,6 +4448,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -4321,6 +4459,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_netbsd_arm.go b/vendor/modernc.org/libc/musl_netbsd_arm.go
index 5eea7fb2a..cf5de9c81 100644
--- a/vendor/modernc.org/libc/musl_netbsd_arm.go
+++ b/vendor/modernc.org/libc/musl_netbsd_arm.go
@@ -854,6 +854,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t1 = uintptr /* alltypes.h:336:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -868,30 +871,51 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t1) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t1) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t1) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
@@ -1611,6 +1635,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1788,6 +1815,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -2093,6 +2123,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t1) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -2104,6 +2137,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t1) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -2130,20 +2166,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2173,6 +2221,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2209,6 +2260,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2527,6 +2581,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -2637,6 +2694,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2836,6 +2896,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2862,10 +2925,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2892,6 +2961,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3270,10 +3342,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -3325,6 +3403,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3399,6 +3480,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3496,6 +3580,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -3817,6 +3904,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -3983,6 +4073,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -4108,6 +4201,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE1)(unsafe.Pointer(f)).Fmode - 1
if (*FILE1)(unsafe.Pointer(f)).Fwpos != (*FILE1)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4127,6 +4223,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4135,6 +4234,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4149,6 +4251,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -4191,14 +4296,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4220,30 +4334,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -4253,6 +4388,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -4261,6 +4399,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_openbsd_386.go b/vendor/modernc.org/libc/musl_openbsd_386.go
index 3bc617399..edc3f1c49 100644
--- a/vendor/modernc.org/libc/musl_openbsd_386.go
+++ b/vendor/modernc.org/libc/musl_openbsd_386.go
@@ -501,6 +501,9 @@ type wchar_t = int32 /* <builtin>:15:24 */
// extern __inline __attribute__((__gnu_inline__))
func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return Bool32(_c == ' ' || _c == '\t')
}
@@ -681,6 +684,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:366:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -695,58 +701,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -756,6 +804,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -1475,6 +1526,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1652,6 +1706,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1957,6 +2014,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -1968,6 +2028,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1994,20 +2057,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2037,6 +2112,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2073,6 +2151,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2391,6 +2472,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = size_t(1)
__1:
@@ -2501,6 +2585,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2700,6 +2787,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2726,10 +2816,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -2756,6 +2852,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3134,10 +3233,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -3189,6 +3294,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3263,6 +3371,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3360,6 +3471,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -3679,6 +3793,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -3845,6 +3962,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -3970,6 +4090,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 72)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -3989,6 +4112,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -3997,6 +4123,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4011,6 +4140,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > size_t(0) {
@@ -4053,14 +4185,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4082,30 +4223,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoll(tls, s, p, base)
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return Xstrtoull(tls, s, p, base)
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
@@ -4115,6 +4277,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint32((int32(p) - int32(s)) / 1)
@@ -4123,6 +4288,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_openbsd_amd64.go b/vendor/modernc.org/libc/musl_openbsd_amd64.go
index c04933495..c8abed68c 100644
--- a/vendor/modernc.org/libc/musl_openbsd_amd64.go
+++ b/vendor/modernc.org/libc/musl_openbsd_amd64.go
@@ -501,6 +501,9 @@ type wchar_t = int32 /* <builtin>:15:24 */
// extern __inline __attribute__((__gnu_inline__))
func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return Bool32(_c == ' ' || _c == '\t')
}
@@ -681,6 +684,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -695,58 +701,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -756,6 +804,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -1477,6 +1528,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1654,6 +1708,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1959,6 +2016,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -1970,6 +2030,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1996,20 +2059,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2039,6 +2114,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2075,6 +2153,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2406,6 +2487,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -2543,6 +2627,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2747,6 +2834,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2773,10 +2863,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2803,6 +2899,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3191,10 +3290,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -3246,6 +3351,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3320,6 +3428,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3417,6 +3528,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -3739,6 +3853,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -3905,6 +4022,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4030,6 +4150,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4049,6 +4172,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4057,6 +4183,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4071,6 +4200,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -4113,14 +4245,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4142,30 +4283,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -4175,6 +4337,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -4183,6 +4348,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_openbsd_arm64.go b/vendor/modernc.org/libc/musl_openbsd_arm64.go
index ba015fc48..e8f504922 100644
--- a/vendor/modernc.org/libc/musl_openbsd_arm64.go
+++ b/vendor/modernc.org/libc/musl_openbsd_arm64.go
@@ -501,6 +501,9 @@ type wchar_t = int32 /* <builtin>:15:24 */
// extern __inline __attribute__((__gnu_inline__))
func Xisblank(tls *TLS, _c int32) int32 { /* ctype_.c:144:5: */
+ if __ccgo_strace {
+ trc("tls=%v _c=%v, (%v:)", tls, _c, origin(2))
+ }
return Bool32(_c == ' ' || _c == '\t')
}
@@ -681,6 +684,9 @@ func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
type locale_t = uintptr /* alltypes.h:351:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -695,58 +701,100 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisdigit(tls, c)
}
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('a') < uint32(26))
}
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('A') < uint32(26))
}
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisupper(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -756,6 +804,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -1477,6 +1528,9 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v prec=%v pok=%v, (%v:)", tls, f, prec, pok, origin(2))
+ }
var sign int32 = 1
var i size_t
var bits int32
@@ -1654,6 +1708,9 @@ var table = [257]uint8{Uint8FromInt32(-1),
} /* intscan.c:7:28 */
func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v base=%v pok=%v lim=%v, (%v:)", tls, f, base, pok, lim, origin(2))
+ }
var val uintptr
var c int32
var neg int32
@@ -1959,6 +2016,9 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v lim=%v, (%v:)", tls, f, lim, origin(2))
+ }
(*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.
@@ -1970,6 +2030,9 @@ func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
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 {
@@ -1996,20 +2059,32 @@ func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */
}
func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
return Xcopysign(tls, x, y)
}
func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
return Xfabs(tls, x)
}
func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v y=%v, (%v:)", tls, x, y, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v, (%v:)", tls, x, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2039,6 +2114,9 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
}
func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2075,6 +2153,9 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
}
func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
+ if __ccgo_strace {
+ trc("tls=%v x=%v n=%v, (%v:)", tls, x, n, origin(2))
+ }
return Xscalbn(tls, x, n)
}
@@ -2406,6 +2487,9 @@ type resolvconf = struct {
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
+ if __ccgo_strace {
+ trc("tls=%v p=%v, (%v:)", tls, p, origin(2))
+ }
var cnt size_t
cnt = uint64(1)
__1:
@@ -2543,6 +2627,9 @@ type __ptcb = struct {
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: */
+ if __ccgo_strace {
+ trc("tls=%v host=%v serv=%v hint=%v res=%v, (%v:)", tls, host, serv, hint, res, origin(2))
+ }
bp := tls.Alloc(1608)
defer tls.Free(1608)
@@ -2747,6 +2834,9 @@ type mmsghdr = struct {
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
+ if __ccgo_strace {
+ trc("tls=%v a=%v l=%v af=%v, (%v:)", tls, a, l, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2773,10 +2863,16 @@ func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* get
var _sh uintptr /* gethostbyaddr.c:9:24: */
func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
return Xgethostbyname2(tls, name, 2)
}
func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v, (%v:)", tls, name, af, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -2803,6 +2899,9 @@ func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbynam
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: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v af=%v h=%v buf=%v buflen=%v res=%v err=%v, (%v:)", tls, name, af, h, buf, buflen, res, err, origin(2))
+ }
bp := tls.Alloc(1600)
defer tls.Free(1600)
@@ -3191,10 +3290,16 @@ func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getna
var Xh_errno int32 /* h_errno.c:4:5: */
func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
return uintptr(unsafe.Pointer(&Xh_errno))
}
func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */
+ if __ccgo_strace {
+ trc("tls=%v s0=%v dest=%v, (%v:)", tls, s0, dest, origin(2))
+ }
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -3246,6 +3351,9 @@ func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5
}
func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v a0=%v s=%v l=%v, (%v:)", tls, af, a0, s, l, origin(2))
+ }
bp := tls.Alloc(276)
defer tls.Free(276)
@@ -3320,6 +3428,9 @@ func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */
}
func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */
+ if __ccgo_strace {
+ trc("tls=%v af=%v s=%v a0=%v, (%v:)", tls, af, s, a0, origin(2))
+ }
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -3417,6 +3528,9 @@ func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.
}
func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v family=%v, (%v:)", tls, buf, name, family, origin(2))
+ }
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -3739,6 +3853,9 @@ func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12:
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v canon=%v name=%v family=%v flags=%v, (%v:)", tls, buf, canon, name, family, flags, origin(2))
+ }
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -3905,6 +4022,9 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */
+ if __ccgo_strace {
+ trc("tls=%v buf=%v name=%v proto=%v socktype=%v flags=%v, (%v:)", tls, buf, name, proto, socktype, flags, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -4030,6 +4150,9 @@ 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: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
*(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
@@ -4049,6 +4172,9 @@ func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
}
func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
+ if __ccgo_strace {
+ trc("tls=%v, (%v:)", tls, origin(2))
+ }
X__builtin_abort(tls) //TODO-
// __stdio_exit_needed();
}
@@ -4057,6 +4183,9 @@ func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */
// data buffered for reading.
func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
+ if __ccgo_strace {
+ trc("tls=%v f=%v, (%v:)", tls, f, origin(2))
+ }
bp := tls.Alloc(1)
defer tls.Free(1)
@@ -4071,6 +4200,9 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -4113,14 +4245,23 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
}
func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return float32(strtox(tls, s, p, 0))
}
func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 1)
}
func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v, (%v:)", tls, s, p, origin(2))
+ }
return strtox(tls, s, p, 2)
}
@@ -4142,30 +4283,51 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
}
func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return intmax_t(Xstrtoll(tls, s, p, base))
}
func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v p=%v base=%v, (%v:)", tls, s, p, base, origin(2))
+ }
return uintmax_t(Xstrtoull(tls, s, p, base))
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
@@ -4175,6 +4337,9 @@ func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
}
func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v n=%v, (%v:)", tls, s, n, origin(2))
+ }
var p uintptr = Xmemchr(tls, s, 0, n)
if p != 0 {
return uint64((int64(p) - int64(s)) / 1)
@@ -4183,6 +4348,9 @@ func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */
}
func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
bp := tls.Alloc(32)
defer tls.Free(32)
diff --git a/vendor/modernc.org/libc/musl_windows_386.go b/vendor/modernc.org/libc/musl_windows_386.go
index 24c5b2408..c14b18c24 100644
--- a/vendor/modernc.org/libc/musl_windows_386.go
+++ b/vendor/modernc.org/libc/musl_windows_386.go
@@ -230,6 +230,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:366:9 */
type locale_t = uintptr /* alltypes.h:366:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -244,50 +247,79 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -297,6 +329,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -328,6 +363,9 @@ type gid_t = uint32 /* alltypes.h:273:18 */
type useconds_t = uint32 /* alltypes.h:283:18 */
func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2))
+ }
var i size_t
var newenv uintptr
var tmp uintptr
@@ -408,6 +446,9 @@ oom:
var _soldenv uintptr /* putenv.c:22:14: */
func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = size_t((int32(X__strchrnul(tls, s, '=')) - int32(s)) / 1)
if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) {
return Xunsetenv(tls, s)
@@ -416,6 +457,9 @@ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
}
func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */
+ if __ccgo_strace {
+ trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2))
+ }
//TODO for (size_t i=0; i < env_alloced_n; i++)
var i size_t = size_t(0)
for ; i < _senv_alloced_n; i++ {
@@ -442,6 +486,9 @@ var _senv_alloced uintptr /* setenv.c:7:14: */
var _senv_alloced_n size_t /* setenv.c:8:16: */
func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */
+ if __ccgo_strace {
+ trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2))
+ }
var s uintptr
var l1 size_t
var l2 size_t
@@ -466,6 +513,9 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /*
}
func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var l size_t = size_t((int32(X__strchrnul(tls, name, '=')) - int32(name)) / 1)
if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -922,6 +972,9 @@ func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
}
func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v wc=%v st=%v, (%v:)", tls, s, wc, st, origin(2))
+ }
if !(s != 0) {
return size_t(1)
}
@@ -961,6 +1014,9 @@ func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c
}
func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t { /* wcsrtombs.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v st=%v, (%v:)", tls, s, ws, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1031,6 +1087,9 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t {
}
func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v, (%v:)", tls, s, ws, n, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
*(*uintptr)(unsafe.Pointer(bp)) = ws
@@ -1049,6 +1108,9 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
// from SUS and have nothing to do with the host system.
func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
@@ -1069,6 +1131,9 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: *
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+size_t(1))
if !(d != 0) {
diff --git a/vendor/modernc.org/libc/musl_windows_amd64.go b/vendor/modernc.org/libc/musl_windows_amd64.go
index d586fb8be..3588b8342 100644
--- a/vendor/modernc.org/libc/musl_windows_amd64.go
+++ b/vendor/modernc.org/libc/musl_windows_amd64.go
@@ -230,6 +230,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */
type locale_t = uintptr /* alltypes.h:343:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -244,50 +247,79 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -297,6 +329,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -328,6 +363,9 @@ type gid_t = uint32 /* alltypes.h:250:18 */
type useconds_t = uint32 /* alltypes.h:260:18 */
func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2))
+ }
var i size_t
var newenv uintptr
var tmp uintptr
@@ -408,6 +446,9 @@ oom:
var _soldenv uintptr /* putenv.c:22:14: */
func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1)
if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) {
return Xunsetenv(tls, s)
@@ -416,6 +457,9 @@ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
}
func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */
+ if __ccgo_strace {
+ trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2))
+ }
//TODO for (size_t i=0; i < env_alloced_n; i++)
var i size_t = uint64(0)
for ; i < _senv_alloced_n; i++ {
@@ -442,6 +486,9 @@ var _senv_alloced uintptr /* setenv.c:7:14: */
var _senv_alloced_n size_t /* setenv.c:8:16: */
func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */
+ if __ccgo_strace {
+ trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2))
+ }
var s uintptr
var l1 size_t
var l2 size_t
@@ -466,6 +513,9 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /*
}
func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1)
if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -945,6 +995,9 @@ func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
}
func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v wc=%v st=%v, (%v:)", tls, s, wc, st, origin(2))
+ }
if !(s != 0) {
return uint64(1)
}
@@ -984,6 +1037,9 @@ func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c
}
func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t { /* wcsrtombs.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v st=%v, (%v:)", tls, s, ws, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1054,6 +1110,9 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t {
}
func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v, (%v:)", tls, s, ws, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = ws
@@ -1063,6 +1122,9 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -1092,6 +1154,9 @@ func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp
// from SUS and have nothing to do with the host system.
func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
@@ -1112,6 +1177,9 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: *
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
diff --git a/vendor/modernc.org/libc/musl_windows_arm64.go b/vendor/modernc.org/libc/musl_windows_arm64.go
index 2804cdc98..9d4e218c0 100644
--- a/vendor/modernc.org/libc/musl_windows_arm64.go
+++ b/vendor/modernc.org/libc/musl_windows_arm64.go
@@ -230,6 +230,9 @@ type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:351:9 */
type locale_t = uintptr /* alltypes.h:351:32 */
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisalpha(tls, c)
@@ -244,50 +247,79 @@ func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
}
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalnum(tls, c)
}
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisalpha(tls, c)
}
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32('0') < uint32(10))
}
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xislower(tls, c)
}
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
}
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisprint(tls, c)
}
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
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: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisspace(tls, c)
}
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v, (%v:)", tls, c, origin(2))
+ }
return Bool32(func() int32 {
if 0 != 0 {
return Xisdigit(tls, c)
@@ -297,6 +329,9 @@ func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
}
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v c=%v l=%v, (%v:)", tls, c, l, origin(2))
+ }
return Xisxdigit(tls, c)
}
@@ -328,6 +363,9 @@ type gid_t = uint32 /* alltypes.h:258:18 */
type useconds_t = uint32 /* alltypes.h:268:18 */
func X__putenv(tls *TLS, s uintptr, l size_t, r uintptr) int32 { /* putenv.c:8:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v l=%v r=%v, (%v:)", tls, s, l, r, origin(2))
+ }
var i size_t
var newenv uintptr
var tmp uintptr
@@ -408,6 +446,9 @@ oom:
var _soldenv uintptr /* putenv.c:22:14: */
func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, s, '=')) - int64(s)) / 1)
if !(l != 0) || !(int32(*(*int8)(unsafe.Pointer(s + uintptr(l)))) != 0) {
return Xunsetenv(tls, s)
@@ -416,6 +457,9 @@ func Xputenv(tls *TLS, s uintptr) int32 { /* putenv.c:43:5: */
}
func X__env_rm_add(tls *TLS, old uintptr, new uintptr) { /* setenv.c:5:6: */
+ if __ccgo_strace {
+ trc("tls=%v old=%v new=%v, (%v:)", tls, old, new, origin(2))
+ }
//TODO for (size_t i=0; i < env_alloced_n; i++)
var i size_t = uint64(0)
for ; i < _senv_alloced_n; i++ {
@@ -442,6 +486,9 @@ var _senv_alloced uintptr /* setenv.c:7:14: */
var _senv_alloced_n size_t /* setenv.c:8:16: */
func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /* setenv.c:26:5: */
+ if __ccgo_strace {
+ trc("tls=%v var1=%v value=%v overwrite=%v, (%v:)", tls, var1, value, overwrite, origin(2))
+ }
var s uintptr
var l1 size_t
var l2 size_t
@@ -466,6 +513,9 @@ func Xsetenv(tls *TLS, var1 uintptr, value uintptr, overwrite int32) int32 { /*
}
func Xunsetenv(tls *TLS, name uintptr) int32 { /* unsetenv.c:9:5: */
+ if __ccgo_strace {
+ trc("tls=%v name=%v, (%v:)", tls, name, origin(2))
+ }
var l size_t = size_t((int64(X__strchrnul(tls, name, '=')) - int64(name)) / 1)
if !(l != 0) || *(*int8)(unsafe.Pointer(name + uintptr(l))) != 0 {
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -1023,6 +1073,9 @@ func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
}
func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c:6:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v wc=%v st=%v, (%v:)", tls, s, wc, st, origin(2))
+ }
if !(s != 0) {
return uint64(1)
}
@@ -1062,6 +1115,9 @@ func Xwcrtomb(tls *TLS, s uintptr, wc wchar_t, st uintptr) size_t { /* wcrtomb.c
}
func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t { /* wcsrtombs.c:3:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v st=%v, (%v:)", tls, s, ws, n, st, origin(2))
+ }
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -1132,6 +1188,9 @@ func Xwcsrtombs(tls *TLS, s uintptr, ws uintptr, n size_t, st uintptr) size_t {
}
func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c:4:8: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v ws=%v n=%v, (%v:)", tls, s, ws, n, origin(2))
+ }
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = ws
@@ -1141,6 +1200,9 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
}
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
+ if __ccgo_strace {
+ trc("tls=%v key=%v base=%v nel=%v width=%v cmp=%v, (%v:)", tls, key, base, nel, width, cmp, origin(2))
+ }
var try uintptr
var sign int32
for nel > uint64(0) {
@@ -1170,6 +1232,9 @@ func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp
// from SUS and have nothing to do with the host system.
func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v c=%v, (%v:)", tls, s, c, origin(2))
+ }
c = int32(uint8(c))
if !(c != 0) {
return s + uintptr(Xstrlen(tls, s))
@@ -1190,6 +1255,9 @@ func X__strchrnul(tls *TLS, s uintptr, c int32) uintptr { /* strchrnul.c:10:6: *
}
func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */
+ if __ccgo_strace {
+ trc("tls=%v s=%v, (%v:)", tls, s, origin(2))
+ }
var l size_t = Xstrlen(tls, s)
var d uintptr = Xmalloc(tls, l+uint64(1))
if !(d != 0) {
diff --git a/vendor/modernc.org/libc/netdb/capi_illumos_amd64.go b/vendor/modernc.org/libc/netdb/capi_illumos_amd64.go
new file mode 100644
index 000000000..4f12690b5
--- /dev/null
+++ b/vendor/modernc.org/libc/netdb/capi_illumos_amd64.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_illumos_amd64.go -pkgname netdb', DO NOT EDIT.
+
+package netdb
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/netdb/capi_linux_loong64.go b/vendor/modernc.org/libc/netdb/capi_linux_loong64.go
index 8be6cacf0..ed2b04ac0 100644
--- a/vendor/modernc.org/libc/netdb/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/netdb/capi_linux_loong64.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 -ignore-unsupported-alignment -o netdb/netdb_linux_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_linux_loong64.go -pkgname netdb', DO NOT EDIT.
package netdb
diff --git a/vendor/modernc.org/libc/netdb/capi_linux_mips64le.go b/vendor/modernc.org/libc/netdb/capi_linux_mips64le.go
new file mode 100644
index 000000000..8be6cacf0
--- /dev/null
+++ b/vendor/modernc.org/libc/netdb/capi_linux_mips64le.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_linux_amd64.go -pkgname netdb', DO NOT EDIT.
+
+package netdb
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go b/vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go
new file mode 100644
index 000000000..b1108972e
--- /dev/null
+++ b/vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go
@@ -0,0 +1,5631 @@
+// 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_illumos_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 (
+ AF_802 = 18 // socket.h:296:1:
+ AF_APPLETALK = 16 // socket.h:294:1:
+ AF_CCITT = 10 // socket.h:288:1:
+ AF_CHAOS = 5 // socket.h:283:1:
+ AF_DATAKIT = 9 // socket.h:287:1:
+ AF_DECnet = 12 // socket.h:290:1:
+ AF_DLI = 13 // socket.h:291:1:
+ AF_ECMA = 8 // socket.h:286:1:
+ AF_FILE = 1 // socket.h:279:1:
+ AF_GOSIP = 22 // socket.h:300:1:
+ AF_HYLINK = 15 // socket.h:293:1:
+ AF_IMPLINK = 3 // socket.h:281:1:
+ AF_INET = 2 // socket.h:280:1:
+ AF_INET6 = 26 // socket.h:304:1:
+ AF_INET_OFFLOAD = 30 // socket.h:308:1:
+ AF_IPX = 23 // socket.h:301:1:
+ AF_KEY = 27 // socket.h:305:1:
+ AF_LAT = 14 // socket.h:292:1:
+ AF_LINK = 25 // socket.h:303:1:
+ AF_LOCAL = 1 // socket.h:278:1:
+ AF_LX_NETLINK = 33 // socket.h:311:1:
+ AF_MAX = 33 // socket.h:313:1:
+ AF_NBS = 7 // socket.h:285:1:
+ AF_NCA = 28 // socket.h:306:1:
+ AF_NIT = 17 // socket.h:295:1:
+ AF_NS = 6 // socket.h:284:1:
+ AF_OSI = 19 // socket.h:297:1:
+ AF_OSINET = 21 // socket.h:299:1:
+ AF_PACKET = 32 // socket.h:310:1:
+ AF_POLICY = 29 // socket.h:307:1:
+ AF_PUP = 4 // socket.h:282:1:
+ AF_ROUTE = 24 // socket.h:302:1:
+ AF_SNA = 11 // socket.h:289:1:
+ AF_TRILL = 31 // socket.h:309:1:
+ AF_UNIX = 1 // socket.h:277:1:
+ AF_UNSPEC = 0 // socket.h:276:1:
+ AF_X25 = 20 // socket.h:298:1:
+ AI_ADDRCONFIG = 0x0004 // netdb.h:139:1:
+ AI_ALL = 0x0002 // netdb.h:138:1:
+ AI_CANONNAME = 0x0010 // netdb.h:132:1:
+ AI_DEFAULT = 5 // netdb.h:147:1:
+ AI_NUMERICHOST = 0x0020 // netdb.h:133:1:
+ AI_NUMERICSERV = 0x0040 // netdb.h:134:1:
+ AI_PASSIVE = 0x0008 // netdb.h:131:1:
+ AI_V4MAPPED = 0x0001 // netdb.h:137:1:
+ CANBSIZ = 256 // param.h:91:1:
+ CDLIMIT = 2048 // param.h:164:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ CMASK = 022 // param.h:163:1:
+ DEFAULT_JUMPPID = 0 // param.h:120:1:
+ DEFAULT_MAXPID = 30000 // param.h:119:1:
+ DEV_BSHIFT = 9 // param.h:251:1:
+ DEV_BSIZE = 512 // param.h:250:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ EAI_ADDRFAMILY = 1 // netdb.h:150:1:
+ EAI_AGAIN = 2 // netdb.h:153:1:
+ EAI_BADFLAGS = 3 // netdb.h:154:1:
+ EAI_FAIL = 4 // netdb.h:155:1:
+ EAI_FAMILY = 5 // netdb.h:156:1:
+ EAI_MAX = 14 // netdb.h:164:1:
+ EAI_MEMORY = 6 // netdb.h:157:1:
+ EAI_NODATA = 7 // netdb.h:151:1:
+ EAI_NONAME = 8 // netdb.h:158:1:
+ EAI_OVERFLOW = 12 // netdb.h:162:1:
+ EAI_PROTOCOL = 13 // netdb.h:163:1:
+ EAI_SERVICE = 9 // netdb.h:159:1:
+ EAI_SOCKTYPE = 10 // netdb.h:160:1:
+ EAI_SYSTEM = 11 // netdb.h:161:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FILF_AUTO = 0x2 // socket.h:232:1:
+ FILF_BYPASS = 0x4 // socket.h:233:1:
+ FILF_PROG = 0x1 // socket.h:231:1:
+ FILNAME_MAX = 32 // socket.h:221:1:
+ FIL_ATTACH = 0x1 // socket.h:217:1:
+ FIL_DETACH = 0x2 // socket.h:218:1:
+ FIL_LIST = 0x3 // socket.h:219:1:
+ FSCALE = 256 // param.h:304:1:
+ FSHIFT = 8 // param.h:303:1:
+ GID_NETADM = 65 // param.h:100:1:
+ GID_NOBODY = 60001 // param.h:95:1:
+ GID_UNKNOWN = 96 // param.h:97:1:
+ HOST_NOT_FOUND = 1 // netdb.h:381:1:
+ IMPLINK_HIGHEXPER = 158 // in.h:284:1:
+ IMPLINK_IP = 155 // in.h:282:1:
+ IMPLINK_LOWEXPER = 156 // in.h:283:1:
+ INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1:
+ INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1:
+ INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1:
+ INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1:
+ INADDR_ANY = 0x00000000 // in.h:366:1:
+ INADDR_BROADCAST = 0xffffffff // in.h:368:1:
+ INADDR_LOOPBACK = 0x7F000001 // in.h:367:1:
+ INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1:
+ INADDR_NONE = 0xffffffff // in.h:369:1:
+ INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1:
+ INET6_ADDRSTRLEN = 46 // in.h:1212:1:
+ INET_ADDRSTRLEN = 16 // in.h:1210:1:
+ IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1:
+ IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1:
+ IN_CLASSA_HOST = 0x00ffffff // in.h:332:1:
+ IN_CLASSA_MAX = 128 // in.h:333:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:330:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:331:1:
+ IN_CLASSB_HOST = 0x0000ffff // in.h:338:1:
+ IN_CLASSB_MAX = 65536 // in.h:339:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:336:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:337:1:
+ IN_CLASSC_HOST = 0x000000ff // in.h:344:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:342:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:343:1:
+ IN_CLASSD_HOST = 0x0fffffff // in.h:349:1:
+ IN_CLASSD_NET = 0xf0000000 // in.h:347:1:
+ IN_CLASSD_NSHIFT = 28 // in.h:348:1:
+ IN_CLASSE_NET = 0xffffffff // in.h:352:1:
+ IN_LOOPBACKNET = 127 // in.h:395:1:
+ IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1:
+ IN_PRIVATE12_NET = 0xac100000 // in.h:382:1:
+ IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1:
+ IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1:
+ IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1:
+ IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1:
+ IPPORT_BIFFUDP = 512 // in.h:250:1:
+ IPPORT_BOOTPC = 68 // in.h:214:1:
+ IPPORT_BOOTPS = 67 // in.h:213:1:
+ IPPORT_CHARGEN = 19 // in.h:199:1:
+ IPPORT_CMDSERVER = 514 // in.h:243:1:
+ IPPORT_DAYTIME = 13 // in.h:197:1:
+ IPPORT_DHCPV6C = 546 // in.h:260:1:
+ IPPORT_DHCPV6S = 547 // in.h:261:1:
+ IPPORT_DISCARD = 9 // in.h:195:1:
+ IPPORT_DOMAIN = 53 // in.h:206:1:
+ IPPORT_ECHO = 7 // in.h:194:1:
+ IPPORT_EFSSERVER = 520 // in.h:245:1:
+ IPPORT_EXECSERVER = 512 // in.h:241:1:
+ IPPORT_FINGER = 79 // in.h:217:1:
+ IPPORT_FTP = 21 // in.h:200:1:
+ IPPORT_HTTP = 80 // in.h:218:1:
+ IPPORT_HTTP_ALT = 8080 // in.h:219:1:
+ IPPORT_IKE = 500 // in.h:235:1:
+ IPPORT_IKE_NATT = 4500 // in.h:236:1:
+ IPPORT_LDAP = 389 // in.h:226:1:
+ IPPORT_LOGINSERVER = 513 // in.h:242:1:
+ IPPORT_MDNS = 5353 // in.h:207:1:
+ IPPORT_MIP = 434 // in.h:228:1:
+ IPPORT_MTP = 57 // in.h:208:1:
+ IPPORT_NAMESERVER = 42 // in.h:204:1:
+ IPPORT_NETBIOS_DGM = 138 // in.h:224:1:
+ IPPORT_NETBIOS_NS = 137 // in.h:223:1:
+ IPPORT_NETBIOS_SSN = 139 // in.h:225:1:
+ IPPORT_NETSTAT = 15 // in.h:198:1:
+ IPPORT_NTP = 123 // in.h:222:1:
+ IPPORT_PRINTER = 515 // in.h:244:1:
+ IPPORT_RESERVED = 1024 // in.h:271:1:
+ IPPORT_RIPNG = 521 // in.h:255:1:
+ IPPORT_RJE = 77 // in.h:216:1:
+ IPPORT_ROUTESERVER = 520 // in.h:254:1:
+ IPPORT_SLP = 427 // in.h:227:1:
+ IPPORT_SMB = 445 // in.h:229:1:
+ IPPORT_SMTP = 25 // in.h:202:1:
+ IPPORT_SOCKS = 1080 // in.h:263:1:
+ IPPORT_SUPDUP = 95 // in.h:221:1:
+ IPPORT_SYSLOG = 514 // in.h:252:1:
+ IPPORT_SYSTAT = 11 // in.h:196:1:
+ IPPORT_TALK = 517 // in.h:253:1:
+ IPPORT_TELNET = 23 // in.h:201:1:
+ IPPORT_TFTP = 69 // in.h:215:1:
+ IPPORT_TIMESERVER = 37 // in.h:203:1:
+ IPPORT_TTYLINK = 87 // in.h:220:1:
+ IPPORT_USERRESERVED = 5000 // in.h:272:1:
+ IPPORT_VXLAN = 4789 // in.h:230:1:
+ IPPORT_WHOIS = 43 // in.h:205:1:
+ IPPORT_WHOSERVER = 513 // in.h:251:1:
+ IPPROTO_AH = 51 // in.h:169:1:
+ IPPROTO_DSTOPTS = 60 // in.h:172:1:
+ IPPROTO_EGP = 8 // in.h:160:1:
+ IPPROTO_ENCAP = 4 // in.h:158:1:
+ IPPROTO_EON = 80 // in.h:175:1:
+ IPPROTO_ESP = 50 // in.h:168:1:
+ IPPROTO_FRAGMENT = 44 // in.h:166:1:
+ IPPROTO_GGP = 3 // in.h:157:1:
+ IPPROTO_HELLO = 63 // in.h:173:1:
+ IPPROTO_HOPOPTS = 0 // in.h:154:1:
+ IPPROTO_ICMP = 1 // in.h:155:1:
+ IPPROTO_ICMPV6 = 58 // in.h:170:1:
+ IPPROTO_IDP = 22 // in.h:163:1:
+ IPPROTO_IGMP = 2 // in.h:156:1:
+ IPPROTO_IP = 0 // in.h:153:1:
+ IPPROTO_IPV6 = 41 // in.h:164:1:
+ IPPROTO_MAX = 256 // in.h:182:1:
+ IPPROTO_ND = 77 // in.h:174:1:
+ IPPROTO_NONE = 59 // in.h:171:1:
+ IPPROTO_OSPF = 89 // in.h:176:1:
+ IPPROTO_PIM = 103 // in.h:177:1:
+ IPPROTO_PUP = 12 // in.h:161:1:
+ IPPROTO_RAW = 255 // in.h:181:1:
+ IPPROTO_ROUTING = 43 // in.h:165:1:
+ IPPROTO_RSVP = 46 // in.h:167:1:
+ IPPROTO_SCTP = 132 // in.h:178:1:
+ IPPROTO_TCP = 6 // in.h:159:1:
+ IPPROTO_UDP = 17 // in.h:162:1:
+ IPSEC_PREF_NEVER = 0x01 // in.h:941:1:
+ IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1:
+ IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1:
+ IPSEC_PROTO_AH = 2 // netdb.h:209:1:
+ IPSEC_PROTO_ESP = 3 // netdb.h:210:1:
+ IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1:
+ IPV6_BOUND_IF = 0x41 // in.h:1307:1:
+ IPV6_CHECKSUM = 0x18 // in.h:1257:1:
+ IPV6_DONTFRAG = 0x21 // in.h:1260:1:
+ IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1:
+ IPV6_DSTOPTS = 0xf // in.h:1234:1:
+ IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1:
+ IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1:
+ IPV6_HOPLIMIT = 0xc // in.h:1231:1:
+ IPV6_HOPOPTS = 0xe // in.h:1233:1:
+ IPV6_JOIN_GROUP = 0x9 // in.h:1202:1:
+ IPV6_LEAVE_GROUP = 0xa // in.h:1204:1:
+ IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1:
+ IPV6_MULTICAST_IF = 0x6 // in.h:1193:1:
+ IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1:
+ IPV6_NEXTHOP = 0xd // in.h:1232:1:
+ IPV6_PAD1_OPT = 0 // in.h:1314:1:
+ IPV6_PATHMTU = 0x25 // in.h:1264:1:
+ IPV6_PKTINFO = 0xb // in.h:1229:1:
+ IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1:
+ IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1:
+ IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1:
+ IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1:
+ IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1:
+ IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1:
+ IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1:
+ IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1:
+ IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1:
+ IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1:
+ IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1:
+ IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1:
+ IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1:
+ IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1:
+ IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1:
+ IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1:
+ IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1:
+ IPV6_RECVPATHMTU = 0x24 // in.h:1263:1:
+ IPV6_RECVPKTINFO = 0x12 // in.h:1239:1:
+ IPV6_RECVRTHDR = 0x16 // in.h:1249:1:
+ IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1:
+ IPV6_RECVTCLASS = 0x19 // in.h:1258:1:
+ IPV6_RTHDR = 0x10 // in.h:1236:1:
+ IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1:
+ IPV6_SEC_OPT = 0x22 // in.h:1261:1:
+ IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1:
+ IPV6_TCLASS = 0x26 // in.h:1265:1:
+ IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1:
+ IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1:
+ IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1:
+ IPV6_V6ONLY = 0x27 // in.h:1266:1:
+ IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1:
+ IP_BLOCK_SOURCE = 0x15 // in.h:923:1:
+ IP_BOUND_IF = 0x41 // in.h:976:1:
+ IP_BROADCAST = 0x106 // in.h:994:1:
+ IP_BROADCAST_TTL = 0x43 // in.h:978:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1:
+ IP_DHCPINIT_IF = 0x45 // in.h:980:1:
+ IP_DONTFRAG = 0x1b // in.h:934:1:
+ IP_DONTROUTE = 0x105 // in.h:990:1:
+ IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1:
+ IP_HDRINCL = 2 // in.h:899:1:
+ IP_MULTICAST_IF = 0x10 // in.h:918:1:
+ IP_MULTICAST_LOOP = 0x12 // in.h:920:1:
+ IP_MULTICAST_TTL = 0x11 // in.h:919:1:
+ IP_NEXTHOP = 0x19 // in.h:927:1:
+ IP_OPTIONS = 1 // in.h:896:1:
+ IP_PKTINFO = 0x1a // in.h:932:1:
+ IP_RECVDSTADDR = 0x7 // in.h:911:1:
+ IP_RECVIF = 0x9 // in.h:913:1:
+ IP_RECVOPTS = 0x5 // in.h:909:1:
+ IP_RECVPKTINFO = 0x1a // in.h:933:1:
+ IP_RECVRETOPTS = 0x6 // in.h:910:1:
+ IP_RECVSLLA = 0xa // in.h:914:1:
+ IP_RECVTOS = 0xc // in.h:916:1:
+ IP_RECVTTL = 0xb // in.h:915:1:
+ IP_RETOPTS = 0x8 // in.h:912:1:
+ IP_REUSEADDR = 0x104 // in.h:986:1:
+ IP_SEC_OPT = 0x22 // in.h:940:1:
+ IP_TOS = 3 // in.h:902:1:
+ IP_TTL = 4 // in.h:906:1:
+ IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1:
+ IP_UNSPEC_SRC = 0x42 // in.h:977:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1:
+ LINUX_SLL_HOST = 0 // socket_impl.h:121:1:
+ LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1:
+ LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1:
+ LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1:
+ MAXADDRS = 35 // netdb.h:397:1:
+ MAXALIASES = 35 // netdb.h:396:1:
+ MAXBSIZE = 8192 // param.h:249:1:
+ MAXFRAG = 8 // param.h:252:1:
+ MAXHOSTNAMELEN = 256 // netdb.h:394:1:
+ MAXLINK = 32767 // param.h:126:1:
+ MAXLINKNAMELEN = 32 // param.h:209:1:
+ MAXNAMELEN = 256 // param.h:202:1:
+ MAXOFFSET_T = 0x7fffffffffffffff // param.h:258:1:
+ MAXOFF_T = 0x7fffffffffffffff // param.h:257:1:
+ MAXPATHLEN = 1024 // param.h:199:1:
+ MAXPROJID = 2147483647 // param.h:125:1:
+ MAXSYMLINKS = 20 // param.h:201:1:
+ MAXUID = 2147483647 // param.h:123:1:
+ MAX_CANON = 256 // param.h:89:1:
+ MAX_INPUT = 512 // param.h:86:1:
+ MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1:
+ MCAST_EXCLUDE = 2 // in.h:1122:1:
+ MCAST_INCLUDE = 1 // in.h:1121:1:
+ MCAST_JOIN_GROUP = 0x29 // in.h:1276:1:
+ MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1:
+ MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1:
+ MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1:
+ MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ MINEPHUID = 0x80000000 // param.h:128:1:
+ MSG_CTRUNC = 0x10 // socket.h:429:1:
+ MSG_DONTROUTE = 0x4 // socket.h:427:1:
+ MSG_DONTWAIT = 0x80 // socket.h:432:1:
+ MSG_DUPCTRL = 0x800 // socket.h:435:1:
+ MSG_EOR = 0x8 // socket.h:428:1:
+ MSG_MAXIOVLEN = 16 // socket.h:440:1:
+ MSG_NOSIGNAL = 0x200 // socket.h:434:1:
+ MSG_NOTIFICATION = 0x100 // socket.h:433:1:
+ MSG_OOB = 0x1 // socket.h:425:1:
+ MSG_PEEK = 0x2 // socket.h:426:1:
+ MSG_TRUNC = 0x20 // socket.h:430:1:
+ MSG_WAITALL = 0x40 // socket.h:431:1:
+ MSG_XPG4_2 = 0x8000 // socket.h:437:1:
+ NADDR = 13 // param.h:212:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ NBPS = 0x20000 // param.h:165:1:
+ NBPSCTR = 512 // param.h:166:1:
+ NCARGS = 2097152 // param.h:294:1:
+ NCARGS32 = 0x100000 // param.h:291:1:
+ NCARGS64 = 0x200000 // param.h:292:1:
+ NC_APPLETALK = "appletalk" // netconfig.h:108:1:
+ NC_BROADCAST = 02 // netconfig.h:85:1:
+ NC_CCITT = "ccitt" // netconfig.h:102:1:
+ NC_CHAOS = "chaos" // netconfig.h:97:1:
+ NC_DATAKIT = "datakit" // netconfig.h:101:1:
+ NC_DECNET = "decnet" // netconfig.h:104:1:
+ NC_DLI = "dli" // netconfig.h:105:1:
+ NC_ECMA = "ecma" // netconfig.h:100:1:
+ NC_GOSIP = "gosip" // netconfig.h:114:1:
+ NC_HYLINK = "hylink" // netconfig.h:107:1:
+ NC_IBTF = "ibtf" // netconfig.h:138:1:
+ NC_ICMP = "icmp" // netconfig.h:132:1:
+ NC_IEEE802 = "ieee802" // netconfig.h:110:1:
+ NC_IMPLINK = "implink" // netconfig.h:95:1:
+ NC_INET = "inet" // netconfig.h:93:1:
+ NC_INET6 = "inet6" // netconfig.h:94:1:
+ NC_KDAPL = "kdapl" // netconfig.h:139:1:
+ NC_KVIPL = "kvipl" // netconfig.h:137:1:
+ NC_LAT = "lat" // netconfig.h:106:1:
+ NC_LOOPBACK = "loopback" // netconfig.h:92:1:
+ NC_NBS = "nbs" // netconfig.h:99:1:
+ NC_NIT = "nit" // netconfig.h:109:1:
+ NC_NOFLAG = 00 // netconfig.h:83:1:
+ NC_NOPROTO = "-" // netconfig.h:129:1:
+ NC_NOPROTOFMLY = "-" // netconfig.h:91:1:
+ NC_NS = "ns" // netconfig.h:98:1:
+ NC_OSI = "osi" // netconfig.h:111:1:
+ NC_OSINET = "osinet" // netconfig.h:113:1:
+ NC_PUP = "pup" // netconfig.h:96:1:
+ NC_RDMA = "rdma" // netconfig.h:123:1:
+ NC_SNA = "sna" // netconfig.h:103:1:
+ NC_TCP = "tcp" // netconfig.h:130:1:
+ NC_TPI_CLTS = 1 // netconfig.h:65:1:
+ NC_TPI_COTS = 2 // netconfig.h:66:1:
+ NC_TPI_COTS_ORD = 3 // netconfig.h:67:1:
+ NC_TPI_RAW = 4 // netconfig.h:68:1:
+ NC_TPI_RDMA = 5 // netconfig.h:77:1:
+ NC_UDP = "udp" // netconfig.h:131:1:
+ NC_VISIBLE = 01 // netconfig.h:84:1:
+ NC_X25 = "x25" // netconfig.h:112:1:
+ NETCONFIG = "/etc/netconfig" // netconfig.h:41:1:
+ NETDB_INTERNAL = -1 // netdb.h:390:1:
+ NETDB_SUCCESS = 0 // netdb.h:391:1:
+ NETPATH = "NETPATH" // netconfig.h:42:1:
+ NGROUPS_MAX_DEFAULT = 16 // param.h:148:1:
+ NGROUPS_OLDMAX = 32 // param.h:143:1:
+ NGROUPS_UMAX = 1024 // param.h:142:1:
+ NGROUPS_UMIN = 0 // param.h:141:1:
+ NI_DGRAM = 0x0010 // netdb.h:171:1:
+ NI_MAXHOST = 1025 // netdb.h:179:1:
+ NI_MAXSERV = 32 // netdb.h:180:1:
+ NI_NAMEREQD = 0x0004 // netdb.h:169:1:
+ NI_NOFQDN = 0x0001 // netdb.h:167:1:
+ NI_NUMERICHOST = 0x0002 // netdb.h:168:1:
+ NI_NUMERICSCOPE = 0x0040 // netdb.h:176:1:
+ NI_NUMERICSERV = 0x0008 // netdb.h:170:1:
+ NI_WITHSCOPEID = 0x0020 // netdb.h:175:1:
+ NMOUNT = 40 // param.h:130:1:
+ NOFILE = 20 // param.h:132:1:
+ NO_ADDRESS = 4 // netdb.h:387:1:
+ NO_DATA = 4 // netdb.h:384:1:
+ NO_RECOVERY = 3 // netdb.h:383:1:
+ NZERO = 20 // param.h:153:1:
+ PF_802 = 18 // socket.h:338:1:
+ PF_APPLETALK = 16 // socket.h:336:1:
+ PF_CCITT = 10 // socket.h:330:1:
+ PF_CHAOS = 5 // socket.h:325:1:
+ PF_DATAKIT = 9 // socket.h:329:1:
+ PF_DECnet = 12 // socket.h:332:1:
+ PF_DLI = 13 // socket.h:333:1:
+ PF_ECMA = 8 // socket.h:328:1:
+ PF_FILE = 1 // socket.h:321:1:
+ PF_GOSIP = 22 // socket.h:342:1:
+ PF_HYLINK = 15 // socket.h:335:1:
+ PF_IMPLINK = 3 // socket.h:323:1:
+ PF_INET = 2 // socket.h:322:1:
+ PF_INET6 = 26 // socket.h:346:1:
+ PF_INET_OFFLOAD = 30 // socket.h:350:1:
+ PF_IPX = 23 // socket.h:343:1:
+ PF_KEY = 27 // socket.h:347:1:
+ PF_LAT = 14 // socket.h:334:1:
+ PF_LINK = 25 // socket.h:345:1:
+ PF_LOCAL = 1 // socket.h:320:1:
+ PF_LX_NETLINK = 33 // socket.h:353:1:
+ PF_MAX = 33 // socket.h:355:1:
+ PF_NBS = 7 // socket.h:327:1:
+ PF_NCA = 28 // socket.h:348:1:
+ PF_NIT = 17 // socket.h:337:1:
+ PF_NS = 6 // socket.h:326:1:
+ PF_OSI = 19 // socket.h:339:1:
+ PF_OSINET = 21 // socket.h:341:1:
+ PF_PACKET = 32 // socket.h:352:1:
+ PF_POLICY = 29 // socket.h:349:1:
+ PF_PUP = 4 // socket.h:324:1:
+ PF_ROUTE = 24 // socket.h:344:1:
+ PF_SNA = 11 // socket.h:331:1:
+ PF_TRILL = 31 // socket.h:351:1:
+ PF_UNIX = 1 // socket.h:319:1:
+ PF_UNSPEC = 0 // socket.h:318:1:
+ PF_X25 = 20 // socket.h:340:1:
+ PIPE_BUF = 5120 // param.h:221:1:
+ PIPE_MAX = 5120 // param.h:225:1:
+ POLLERR = 0x0008 // poll.h:74:1:
+ POLLET = 0x2000 // poll.h:84:1:
+ POLLHUP = 0x0010 // poll.h:75:1:
+ POLLIN = 0x0001 // poll.h:59:1:
+ POLLNORM = 64 // poll.h:68:1:
+ POLLNVAL = 0x0020 // poll.h:76:1:
+ POLLONESHOT = 0x1000 // poll.h:83:1:
+ POLLOUT = 0x0004 // poll.h:61:1:
+ POLLPRI = 0x0002 // poll.h:60:1:
+ POLLRDBAND = 0x0080 // poll.h:64:1:
+ POLLRDHUP = 0x4000 // poll.h:66:1:
+ POLLRDNORM = 0x0040 // poll.h:62:1:
+ POLLREMOVE = 0x0800 // poll.h:82:1:
+ POLLWRBAND = 0x0100 // poll.h:65:1:
+ POLLWRNORM = 4 // poll.h:63:1:
+ PREMOTE = 39 // param.h:185:1:
+ PROTO_SDP = 257 // in.h:185:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SCM_RIGHTS = 0x1010 // socket.h:197:1:
+ SCM_TIMESTAMP = 4115 // socket.h:201:1:
+ SCM_UCRED = 0x1012 // socket.h:199:1:
+ SCOPE_DELIMITER = 37 // netdb.h:187:1:
+ SCTRSHFT = 9 // param.h:168:1:
+ SEC = 1 // time.h:244:1:
+ SHUT_RD = 0 // socket.h:458:1:
+ SHUT_RDWR = 2 // socket.h:460:1:
+ SHUT_WR = 1 // socket.h:459:1:
+ SOCK_CLOEXEC = 0x080000 // socket.h:127:1:
+ SOCK_DGRAM = 1 // socket.h:113:1:
+ SOCK_NDELAY = 0x200000 // socket.h:129:1:
+ SOCK_NONBLOCK = 0x100000 // socket.h:128:1:
+ SOCK_RAW = 4 // socket.h:114:1:
+ SOCK_RDM = 5 // socket.h:120:1:
+ SOCK_SEQPACKET = 6 // socket.h:121:1:
+ SOCK_STREAM = 2 // socket.h:112:1:
+ SOCK_TYPE_MASK = 0xffff // socket.h:122:1:
+ SOL_FILTER = 0xfffc // socket.h:267:1:
+ SOL_PACKET = 0xfffd // socket.h:266:1:
+ SOL_ROUTE = 0xfffe // socket.h:264:1:
+ SOL_SOCKET = 0xffff // socket.h:262:1:
+ SOMAXCONN = 128 // socket.h:360:1:
+ SO_ACCEPTCONN = 0x0002 // socket.h:135:1:
+ SO_ALLZONES = 0x1014 // socket.h:202:1:
+ SO_ANON_MLP = 0x100a // socket.h:191:1:
+ SO_ATTACH_FILTER = 0x40000001 // socket.h:157:1:
+ SO_BROADCAST = 0x0020 // socket.h:139:1:
+ SO_DEBUG = 0x0001 // socket.h:134:1:
+ SO_DETACH_FILTER = 0x40000002 // socket.h:158:1:
+ SO_DGRAM_ERRIND = 0x0200 // socket.h:143:1:
+ SO_DOMAIN = 0x100c // socket.h:193:1:
+ SO_DONTLINGER = -129 // socket.h:177:1:
+ SO_DONTROUTE = 0x0010 // socket.h:138:1:
+ SO_ERROR = 0x1007 // socket.h:188:1:
+ SO_EXCLBIND = 0x1015 // socket.h:203:1:
+ SO_KEEPALIVE = 0x0008 // socket.h:137:1:
+ SO_LINGER = 0x0080 // socket.h:141:1:
+ SO_MAC_EXEMPT = 0x100b // socket.h:192:1:
+ SO_MAC_IMPLICIT = 0x1016 // socket.h:204:1:
+ SO_OOBINLINE = 0x0100 // socket.h:142:1:
+ SO_PROTOTYPE = 0x1009 // socket.h:190:1:
+ SO_RCVBUF = 0x1002 // socket.h:183:1:
+ SO_RCVLOWAT = 0x1004 // socket.h:185:1:
+ SO_RCVPSH = 0x100d // socket.h:194:1:
+ SO_RCVTIMEO = 0x1006 // socket.h:187:1:
+ SO_RECVUCRED = 0x0400 // socket.h:144:1:
+ SO_REUSEADDR = 0x0004 // socket.h:136:1:
+ SO_SECATTR = 0x1011 // socket.h:198:1:
+ SO_SNDBUF = 0x1001 // socket.h:182:1:
+ SO_SNDLOWAT = 0x1003 // socket.h:184:1:
+ SO_SNDTIMEO = 0x1005 // socket.h:186:1:
+ SO_TIMESTAMP = 0x1013 // socket.h:200:1:
+ SO_TYPE = 0x1008 // socket.h:189:1:
+ SO_USELOOPBACK = 0x0040 // socket.h:140:1:
+ SO_VRRP = 0x1017 // socket.h:205:1:
+ SYSNAME = 9 // param.h:184:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TRY_AGAIN = 2 // netdb.h:382:1:
+ TYPICALMAXPATHLEN = 64 // param.h:200:1:
+ UBSIZE = 512 // param.h:167:1:
+ UID_DLADM = 15 // param.h:98:1:
+ UID_NETADM = 16 // param.h:99:1:
+ UID_NOACCESS = 60002 // param.h:101:1:
+ UID_NOBODY = 60001 // param.h:94:1:
+ UID_UNKNOWN = 96 // param.h:96:1:
+ UIOA_ALLOC = 0x0001 // uio.h:194:1:
+ UIOA_CLR = -16 // uio.h:199:1:
+ UIOA_ENABLED = 0x0004 // uio.h:196:1:
+ UIOA_FINI = 0x0008 // uio.h:197:1:
+ UIOA_INIT = 0x0002 // uio.h:195:1:
+ UIOA_IOV_MAX = 16 // uio.h:112:1:
+ UIOA_POLL = 0x0010 // uio.h:201:1:
+ UIO_ASYNC = 0x0002 // uio.h:237:1:
+ UIO_COPY_CACHED = 0x0001 // uio.h:235:1:
+ UIO_COPY_DEFAULT = 0x0000 // uio.h:234:1:
+ UIO_XUIO = 0x0004 // uio.h:238:1:
+ X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
+ X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
+ X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
+ X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
+ X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
+ X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
+ X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
+ X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
+ X_CS_LFS_LIBS = 70 // unistd.h:58:1:
+ X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
+ X_CS_PATH = 65 // unistd.h:50:1:
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
+ X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
+ X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
+ X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IN_ADDR_T = 0 // byteorder.h:78:1:
+ X_IN_PORT_T = 0 // byteorder.h:73:1:
+ X_IPADDR_T = 0 // in.h:98:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NETDB_H = 0 // netdb.h:74:1:
+ X_NETINET_IN_H = 0 // in.h:33:1:
+ X_NET_IF_DL_H = 0 // if_dl.h:39:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1:
+ X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:87:1:
+ X_PATH_HOSTS = "/etc/hosts" // netdb.h:88:1:
+ X_PATH_IPNODES = "/etc/inet/ipnodes" // netdb.h:89:1:
+ X_PATH_IPSECALGS = "/etc/inet/ipsecalgs" // netdb.h:90:1:
+ X_PATH_NETMASKS = "/etc/netmasks" // netdb.h:91:1:
+ X_PATH_NETWORKS = "/etc/networks" // netdb.h:92:1:
+ X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:93:1:
+ X_PATH_SERVICES = "/etc/services" // netdb.h:94:1:
+ X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
+ X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
+ X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
+ X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
+ X_PC_ASYNC_IO = 10 // unistd.h:299:1:
+ X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
+ X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
+ X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
+ X_PC_LAST = 101 // unistd.h:336:1:
+ X_PC_LINK_MAX = 1 // unistd.h:289:1:
+ X_PC_MAX_CANON = 2 // unistd.h:290:1:
+ X_PC_MAX_INPUT = 3 // unistd.h:291:1:
+ X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
+ X_PC_NAME_MAX = 4 // unistd.h:292:1:
+ X_PC_NO_TRUNC = 7 // unistd.h:295:1:
+ X_PC_PATH_MAX = 5 // unistd.h:293:1:
+ X_PC_PIPE_BUF = 6 // unistd.h:294:1:
+ X_PC_PRIO_IO = 11 // unistd.h:300:1:
+ X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
+ X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
+ X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
+ X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
+ X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
+ X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
+ X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
+ X_PC_SYNC_IO = 12 // unistd.h:301:1:
+ X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
+ X_PC_VDISABLE = 8 // unistd.h:296:1:
+ X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
+ X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
+ X_POSIX2_C_BIND = 1 // unistd.h:401:1:
+ X_POSIX2_C_DEV = 1 // unistd.h:402:1:
+ X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
+ X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
+ X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
+ X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
+ X_POSIX2_UPE = 1 // unistd.h:406:1:
+ X_POSIX2_VERSION = 199209 // unistd.h:363:1:
+ X_POSIX_REGEXP = 1 // unistd.h:410:1:
+ X_POSIX_SHELL = 1 // unistd.h:411:1:
+ X_POSIX_VDISABLE = 0 // param.h:70:1:
+ X_POSIX_VERSION = 199506 // unistd.h:355:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SA_FAMILY_T = 0 // socket_impl.h:42:1:
+ X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
+ X_SC_2_C_BIND = 45 // unistd.h:153:1:
+ X_SC_2_C_DEV = 46 // unistd.h:154:1:
+ X_SC_2_C_VERSION = 47 // unistd.h:155:1:
+ X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
+ X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
+ X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
+ X_SC_2_PBS = 724 // unistd.h:246:1:
+ X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
+ X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
+ X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
+ X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
+ X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
+ X_SC_2_SW_DEV = 51 // unistd.h:159:1:
+ X_SC_2_UPE = 52 // unistd.h:160:1:
+ X_SC_2_VERSION = 53 // unistd.h:161:1:
+ X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
+ X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
+ X_SC_AIO_MAX = 19 // unistd.h:126:1:
+ X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
+ X_SC_ARG_MAX = 1 // unistd.h:106:1:
+ X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
+ X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
+ X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
+ X_SC_BARRIERS = 732 // unistd.h:253:1:
+ X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
+ X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
+ X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
+ X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
+ X_SC_CHILD_MAX = 2 // unistd.h:107:1:
+ X_SC_CLK_TCK = 3 // unistd.h:108:1:
+ X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
+ X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
+ X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
+ X_SC_CPUID_MAX = 517 // unistd.h:211:1:
+ X_SC_CPUTIME = 734 // unistd.h:255:1:
+ X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
+ X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
+ X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
+ X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
+ X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
+ X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
+ X_SC_EPHID_MAX = 518 // unistd.h:212:1:
+ X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
+ X_SC_FSYNC = 23 // unistd.h:130:1:
+ X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
+ X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
+ X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
+ X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
+ X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
+ X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
+ X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
+ X_SC_IOV_MAX = 77 // unistd.h:180:1:
+ X_SC_IPV6 = 762 // unistd.h:283:1:
+ X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
+ X_SC_LINE_MAX = 60 // unistd.h:168:1:
+ X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
+ X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
+ X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
+ X_SC_MAXPID = 514 // unistd.h:208:1:
+ X_SC_MEMLOCK = 25 // unistd.h:132:1:
+ X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
+ X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
+ X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
+ X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
+ X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
+ X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
+ X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
+ X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
+ X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
+ X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
+ X_SC_OPEN_MAX = 5 // unistd.h:110:1:
+ X_SC_PAGESIZE = 11 // unistd.h:117:1:
+ X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
+ X_SC_PASS_MAX = 9 // unistd.h:115:1:
+ X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
+ X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
+ X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
+ X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
+ X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
+ X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
+ X_SC_REGEXP = 738 // unistd.h:259:1:
+ X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
+ X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
+ X_SC_SAVED_IDS = 7 // unistd.h:112:1:
+ X_SC_SEMAPHORES = 35 // unistd.h:142:1:
+ X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
+ X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
+ X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
+ X_SC_SHELL = 739 // unistd.h:260:1:
+ X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
+ X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
+ X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
+ X_SC_SPAWN = 740 // unistd.h:261:1:
+ X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
+ X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
+ X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
+ X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
+ X_SC_STACK_PROT = 515 // unistd.h:209:1:
+ X_SC_STREAM_MAX = 16 // unistd.h:122:1:
+ X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
+ X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
+ X_SC_THREADS = 576 // unistd.h:227:1:
+ X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
+ X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
+ X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
+ X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
+ X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
+ X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
+ X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
+ X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
+ X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
+ X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
+ X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
+ X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
+ X_SC_TIMEOUTS = 747 // unistd.h:268:1:
+ X_SC_TIMERS = 43 // unistd.h:150:1:
+ X_SC_TIMER_MAX = 44 // unistd.h:151:1:
+ X_SC_TRACE = 748 // unistd.h:269:1:
+ X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
+ X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
+ X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
+ X_SC_TRACE_LOG = 752 // unistd.h:273:1:
+ X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
+ X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
+ X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
+ X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
+ X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
+ X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
+ X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
+ X_SC_UADDR_MAX = 519 // unistd.h:213:1:
+ X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
+ X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
+ X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
+ X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
+ X_SC_VERSION = 8 // unistd.h:113:1:
+ X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
+ X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
+ X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
+ X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
+ X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
+ X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
+ X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
+ X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
+ X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
+ X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
+ X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
+ X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
+ X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
+ X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOCKLEN_T = 0 // in.h:48:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_SS_MAXSIZE = 256 // socket_impl.h:70:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_CRED_H = 0 // cred.h:35:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NETCONFIG_H = 0 // netconfig.h:35:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_PARAM_H = 0 // param.h:41:1:
+ X_SYS_POLL_H = 0 // poll.h:38:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_SOCKET_H = 0 // socket.h:47:1:
+ X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UIO_H = 0 // uio.h:45:1:
+ X_SYS_UNISTD_H = 0 // unistd.h:40:1:
+ X_SYS_UN_H = 0 // un.h:39:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_TTY_BUFSIZ = 2048 // param.h:75:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
+ X_XOPEN_REALTIME = 1 // unistd.h:388:1:
+ X_XOPEN_SHM = 1 // unistd.h:390:1:
+ X_XOPEN_STREAMS = 1 // unistd.h:412:1:
+ X_XOPEN_UNIX = 0 // unistd.h:382:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
+ X_XOPEN_XPG3 = 0 // unistd.h:380:1:
+ X_XOPEN_XPG4 = 0 // unistd.h:381:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 1
+)
+
+// uio extensions
+//
+// PSARC 2009/478: Copy Reduction Interfaces
+const ( /* uio.h:146:1: */
+ UIOTYPE_ASYNCIO = 0
+ UIOTYPE_ZEROCOPY = 1
+ UIOTYPE_PEEKSIZE = 2
+)
+
+// I/O direction.
+const ( /* uio.h:220:1: */
+ UIO_READ = 0
+ UIO_WRITE = 1
+)
+
+// Segment flag values.
+const ( /* uio.h:93:1: */
+ UIO_USERSPACE = 0
+ UIO_SYSSPACE = 1
+ UIO_USERISPACE = 2
+)
+
+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 */
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// BIND 4.9.3:
+//
+// 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. 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.
+// -
+// 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--
+//
+// End BIND 4.9.3
+
+// 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).
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// BIND 4.9.3:
+//
+// 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. 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.
+// -
+// 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--
+//
+// End BIND 4.9.3
+
+// 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).
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2015, Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+// Copyright (c) 1982, 1986 Regents of the University of California.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms are permitted
+// provided that this notice is preserved and that due credit is given
+// to the University of California at Berkeley. The name of the University
+// may not be used to endorse or promote products derived from this
+// software without specific prior written permission. This software
+// is provided ``as is'' without express or implied warranty.
+
+// Constants and structures defined by the internet system,
+// according to following documents
+//
+// Internet ASSIGNED NUMBERS (RFC1700) and its successors:
+// http://www.iana.org/assignments/protocol-numbers
+// http://www.iana.org/assignments/port-numbers
+// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
+//
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Portions of this source code were derived from Berkeley 4.3 BSD
+// under license from the Regents of the University of California.
+
+type Sa_family_t = uint16 /* socket_impl.h:43:18 */
+
+// Structure used by kernel to store most
+// addresses.
+type Sockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]int8
+} /* socket_impl.h:50:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Definitions for UNIX IPC domain.
+type Sockaddr_un = struct {
+ Fsun_family uint16
+ Fsun_path [108]int8
+} /* un.h:53:1 */
+
+// Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// 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 UCB 8.1 (Berkeley) 6/10/93
+
+// A Link-Level Sockaddr may specify the interface in one of two
+// ways: either by means of a system-provided index number (computed
+// anew and possibly differently on every reboot), or by a human-readable
+// string such as "il0" (for managerial convenience).
+//
+// Census taking actions, such as something akin to SIOCGCONF would return
+// both the index and the human name.
+//
+// High volume transactions (such as giving a link-level ``from'' address
+// in a recvfrom or recvmsg call) may be likely only to provide the indexed
+// form, (which requires fewer copy operations and less space).
+//
+// The form and interpretation of the link-level address is purely a matter
+// of convention between the device driver and its consumers; however, it is
+// expected that all drivers for an interface of a given if_type will agree.
+
+// Structure of a Link-Level sockaddr:
+type Sockaddr_dl = struct {
+ Fsdl_family uint16
+ Fsdl_index uint16
+ Fsdl_type uint8
+ Fsdl_nlen uint8
+ Fsdl_alen uint8
+ Fsdl_slen uint8
+ Fsdl_data [244]int8
+} /* if_dl.h:68:1 */
+
+// sockaddr_storage:
+// Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
+// structures. Has sufficient size and alignment for those sockaddrs.
+
+// Desired maximum size, alignment size and related types.
+
+// To represent desired sockaddr max alignment for platform, a
+// type is chosen which may depend on implementation platform architecture.
+// Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
+// We desire to force up to (but no more than) 64-bit (8 byte) alignment,
+// on platforms where it is possible to do so. (e.g not possible on ia32).
+// For all currently supported platforms by our implementation
+// in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
+// type "double" is suitable for that intent.
+//
+// Note: Type "double" is chosen over the more obvious integer type int64_t.
+//
+// int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
+type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */
+
+// Definitions used for sockaddr_storage structure paddings design.
+
+type Sockaddr_storage = struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+} /* socket_impl.h:96:1 */
+
+// To be compatible with the Linux interfaces used, this structure is
+// placed in socket_impl.h so that an include for <sys/socket.h> will
+// pickup this structure. This structure is for use with PF_PACKET
+// sockets.
+type Sockaddr_ll = struct {
+ Fsll_family uint16
+ Fsll_protocol uint16
+ Fsll_ifindex int32
+ Fsll_hatype uint16
+ Fsll_pkttype uint8
+ Fsll_halen uint8
+ Fsll_addr [8]uint8
+} /* socket_impl.h:111:1 */
+
+// The socklen definitions are reproduced here from sys/socket.h so as to
+// not introduce that namespace into existing users of netinet/in.h.
+type Socklen_t = uint32 /* in.h:57:18 */
+
+type Psocklen_t = uintptr /* in.h:63:15 */
+
+// Symbols such as htonl() are required to be exposed through this file,
+// per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// macros for conversion between host and (internet) network byte order
+
+type In_port_t = uint16 /* byteorder.h:74:18 */
+
+type In_addr_t = uint32 /* byteorder.h:79:18 */
+
+// Macros to reverse byte order
+
+// Macros to convert from a specific byte order to/from native byte order
+
+// Macros to read unaligned values from a specific byte order to
+// native byte order
+
+// Macros to write unaligned values from native byte order to a specific byte
+// order.
+
+// Note: IPv4 address data structures usage conventions.
+// The "in_addr_t" type below (required by Unix standards)
+// is NOT a typedef of "struct in_addr" and violates the usual
+// conventions where "struct <name>" and <name>_t are corresponding
+// typedefs.
+// To minimize confusion, kernel data structures/usage prefers use
+// of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
+// The user level APIs continue to follow the historic popular
+// practice of using "struct in_addr".
+
+type Ipaddr_t = uint32 /* in.h:99:18 */
+
+type In6_addr = struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+} /* in.h:104:1 */
+
+type In6_addr_t = In6_addr /* in.h:137:25 */
+
+// Protocols
+//
+// Some of these constant names are copied for the DTrace IP provider in
+// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
+// in sync.
+// Transmission Protocol
+
+// Port/socket numbers: network standard functions
+//
+// Entries should exist here for each port number compiled into an ON
+// component, such as snoop.
+
+// Port/socket numbers: host specific functions
+
+// Internet Key Exchange (IKE) ports
+
+// UNIX TCP sockets
+
+// UNIX UDP sockets
+
+// DHCPv6 UDP ports
+
+// Ports < IPPORT_RESERVED are reserved for
+// privileged processes (e.g. root).
+// Ports > IPPORT_USERRESERVED are reserved
+// for servers, not necessarily privileged.
+
+// Link numbers
+
+// IPv4 Internet address
+// This definition contains obsolete fields for compatibility
+// with SunOS 3.x and 4.2bsd. The presence of subnets renders
+// divisions into fixed fields misleading at best. New code
+// should use only the s_addr field.
+
+type In_addr = struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+} /* in.h:301: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.
+//
+// Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
+// IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
+// obsolete". IN_MULTICAST macro should be used to test if a address
+// is a multicast address.
+
+// We have removed CLASS E checks from the kernel
+// But we preserve these defines for userland in order
+// to avoid compile breakage of some 3rd party piece of software
+
+// Scoped IPv4 prefixes (in host byte-order)
+
+// RFC 3927 IPv4 link local address (i in host byte-order)
+
+// Well known 6to4 Relay Router Anycast address defined in RFC 3068
+
+// Define a macro to stuff the loopback address into an Internet address
+
+// IPv4 Socket address.
+type Sockaddr_in = struct {
+ Fsin_family uint16
+ Fsin_port uint16
+ Fsin_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fsin_zero [8]int8
+} /* in.h:409:1 */
+
+// IPv6 socket address.
+type Sockaddr_in6 = struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+} /* in.h:424:1 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req = struct {
+ Fipsr_ah_req uint32
+ Fipsr_esp_req uint32
+ Fipsr_self_encap_req uint32
+ Fipsr_auth_alg uint8
+ Fipsr_esp_alg uint8
+ Fipsr_esp_auth_alg uint8
+ F__ccgo_pad1 [1]byte
+} /* in.h:950:9 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req_t = Ipsec_req /* in.h:957:3 */
+
+// MCAST_* options are protocol-independent. The actual definitions
+// are with the v6 options below; this comment is here to note the
+// namespace usage.
+//
+// #define MCAST_JOIN_GROUP 0x29
+// #define MCAST_LEAVE_GROUP 0x2a
+// #define MCAST_BLOCK_SOURCE 0x2b
+// #define MCAST_UNBLOCK_SOURCE 0x2c
+// #define MCAST_JOIN_SOURCE_GROUP 0x2d
+// #define MCAST_LEAVE_SOURCE_GROUP 0x2e
+
+// SunOS private (potentially not portable) IP_ option names
+// can be reused 0x44
+
+// Option values and names (when !_XPG5) shared with <xti_inet.h>
+
+// The following option values are reserved by <xti_inet.h>
+//
+// T_IP_OPTIONS 0x107 - IP per-packet options
+// T_IP_TOS 0x108 - IP per packet type of service
+
+// Default value constants for multicast attributes controlled by
+// IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
+
+// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
+type Ip_mreq = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1015:1 */
+
+// Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
+// IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
+type Ip_mreq_source = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_sourceaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1024:1 */
+
+// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
+// IPv6 addresses.
+type Ipv6_mreq = struct {
+ Fipv6mr_multiaddr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipv6mr_interface uint32
+} /* in.h:1034:1 */
+
+// Use #pragma pack() construct to force 32-bit alignment on amd64.
+// This is needed to keep the structure size and offsets consistent
+// between a 32-bit app and the 64-bit amd64 kernel in structures
+// where 64-bit alignment would create gaps (in this case, structures
+// which have a uint32_t followed by a struct sockaddr_storage).
+
+// Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
+type Group_req = struct {
+ Fgr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1053:1 */
+
+// Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
+// MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
+type Group_source_req = struct {
+ Fgsr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgsr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgsr_source struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1062:1 */
+
+// Argument for SIOC[GS]MSFILTER ioctls
+type Group_filter = struct {
+ Fgf_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgf_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgf_fmode uint32
+ Fgf_numsrc uint32
+ Fgf_slist [1]struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1071:1 */
+
+// Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
+type Ip_msfilter = struct {
+ Fimsf_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_fmode uint32
+ Fimsf_numsrc uint32
+ Fimsf_slist [1]struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1090:1 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo = struct {
+ Fipi_ifindex uint32
+ Fipi_spec_dst struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fipi_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1127:9 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */
+
+// Argument struct for IPV6_PKTINFO option
+type In6_pktinfo = struct {
+ Fipi6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipi6_ifindex uint32
+} /* in.h:1136:1 */
+
+// Argument struct for IPV6_MTUINFO option
+type Ip6_mtuinfo = struct {
+ Fip6m_addr struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+ }
+ Fip6m_mtu uint32
+} /* in.h:1144:1 */
+
+// Argument structure for IP_ADD_PROXY_ADDR.
+// Note that this is an unstable, experimental interface. It may change
+// later. Don't use it unless you know what it is.
+type In_prefix_t = struct {
+ Fin_prefix_addr In_addr
+ Fin_prefix_len uint32
+} /* in.h:1183:3 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright 2015, Joyent, Inc. All rights reserved.
+// Copyright 2022 Garrett D'Amore
+//
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// Copyright (c) 2014, Joyent, Inc. All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright (c) 2015, Joyent, Inc. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// I/O parameter information. A uio structure describes the I/O which
+// is to be performed by an operation. Typically the data movement will
+// be performed by a routine such as uiomove(), which updates the uio
+// structure to reflect what was done.
+
+type Iovec = struct {
+ Fiov_base uintptr
+ Fiov_len uint64
+} /* uio.h:68:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright 2015, Joyent, Inc. All rights reserved.
+// Copyright 2022 Garrett D'Amore
+//
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// Copyright (c) 2014, Joyent, Inc. All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright (c) 2015, Joyent, Inc. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// I/O parameter information. A uio structure describes the I/O which
+// is to be performed by an operation. Typically the data movement will
+// be performed by a routine such as uiomove(), which updates the uio
+// structure to reflect what was done.
+
+type Iovec_t = Iovec /* uio.h:75:3 */
+
+// Segment flag values.
+type Uio_seg_t = uint32 /* uio.h:93:70 */
+
+type Uio = struct {
+ Fuio_iov uintptr
+ Fuio_iovcnt int32
+ F__ccgo_pad1 [4]byte
+ F_uio_offset Lloff_t
+ Fuio_segflg uint32
+ Fuio_fmode uint16
+ Fuio_extflg uint16
+ F_uio_limit Lloff_t
+ Fuio_resid int64
+} /* uio.h:95:9 */
+
+type Uio_t = Uio /* uio.h:104:3 */
+
+// Extended uio_t uioa_t used for asynchronous uio.
+//
+// Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
+// as there isn't a formal definition of IOV_MAX for the kernel.
+
+type Uioa_page_s = struct {
+ Fuioa_pfncnt int32
+ F__ccgo_pad1 [4]byte
+ Fuioa_ppp uintptr
+ Fuioa_base uintptr
+ Fuioa_len uint64
+} /* uio.h:114:9 */
+
+// Extended uio_t uioa_t used for asynchronous uio.
+//
+// Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
+// as there isn't a formal definition of IOV_MAX for the kernel.
+
+type Uioa_page_t = Uioa_page_s /* uio.h:119:3 */
+
+type Uioa_s = struct {
+ Fuio_iov uintptr
+ Fuio_iovcnt int32
+ F__ccgo_pad1 [4]byte
+ F_uio_offset Lloff_t
+ Fuio_segflg uint32
+ Fuio_fmode uint16
+ Fuio_extflg uint16
+ F_uio_limit Lloff_t
+ Fuio_resid int64
+ Fuioa_state uint32
+ F__ccgo_pad2 [4]byte
+ Fuioa_mbytes int64
+ Fuioa_lcur uintptr
+ Fuioa_lppp uintptr
+ Fuioa_hwst [4]uintptr
+ Fuioa_locked [16]Uioa_page_t
+} /* uio.h:121:9 */
+
+type Uioa_t = Uioa_s /* uio.h:139:3 */
+
+// uio extensions
+//
+// PSARC 2009/478: Copy Reduction Interfaces
+type Xuio_type_t = uint32 /* uio.h:150:3 */
+
+type Xuio = struct {
+ Fxu_uio Uio_t
+ Fxu_type uint32
+ F__ccgo_pad1 [4]byte
+ Fxu_ext struct {
+ Fxu_aio struct {
+ Fxu_a_state uint32
+ F__ccgo_pad1 [4]byte
+ Fxu_a_mbytes int64
+ Fxu_a_lcur uintptr
+ Fxu_a_lppp uintptr
+ Fxu_a_hwst [4]uintptr
+ Fxu_a_locked [16]Uioa_page_t
+ }
+ }
+} /* uio.h:152:9 */
+
+type Xuio_t = Xuio /* uio.h:189:3 */
+
+// I/O direction.
+type Uio_rw_t = uint32 /* uio.h:220:45 */
+
+// uio_extflg: extended flags
+//
+// NOTE: This flag will be used in uiomove to determine if non-temporal
+// access, ie, access bypassing caches, should be used. Filesystems that
+// don't initialize this field could experience suboptimal performance due to
+// the random data the field contains.
+//
+// NOTE: This flag is also used by uioasync callers to pass an extended
+// uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
+// consumers of a uioa_t require the uio_extflg to be initialized.
+
+// Global uioasync capability shadow state.
+type Uioasync_s = struct {
+ Fenabled uint32
+ F__ccgo_pad1 [4]byte
+ Fmincnt uint64
+} /* uio.h:243:9 */
+
+// uio_extflg: extended flags
+//
+// NOTE: This flag will be used in uiomove to determine if non-temporal
+// access, ie, access bypassing caches, should be used. Filesystems that
+// don't initialize this field could experience suboptimal performance due to
+// the random data the field contains.
+//
+// NOTE: This flag is also used by uioasync callers to pass an extended
+// uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
+// consumers of a uioa_t require the uio_extflg to be initialized.
+
+// Global uioasync capability shadow state.
+type Uioasync_t = Uioasync_s /* uio.h:246:3 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Portions of this source code were derived from Berkeley 4.3 BSD
+// under license from the Regents of the University of California.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 Joyent, Inc.
+
+type Netconfig = struct {
+ Fnc_netid uintptr
+ Fnc_semantics uint32
+ Fnc_flag uint32
+ Fnc_protofmly uintptr
+ Fnc_proto uintptr
+ Fnc_device uintptr
+ Fnc_nlookups uint32
+ F__ccgo_pad1 [4]byte
+ Fnc_lookups uintptr
+ Fnc_unused [8]uint32
+} /* netconfig.h:44:1 */
+
+type NCONF_HANDLE = struct {
+ Fnc_head uintptr
+ Fnc_curr uintptr
+} /* netconfig.h:59:3 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd = struct {
+ Ffd int32
+ Fevents int16
+ Frevents int16
+} /* poll.h:48:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd_t = Pollfd /* poll.h:52:3 */
+
+type Nfds_t = uint64 /* poll.h:54:23 */
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2015, Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+// Copyright (c) 1982, 1986 Regents of the University of California.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms are permitted
+// provided that this notice is preserved and that due credit is given
+// to the University of California at Berkeley. The name of the University
+// may not be used to endorse or promote products derived from this
+// software without specific prior written permission. This software
+// is provided ``as is'' without express or implied warranty.
+
+// Constants and structures defined by the internet system,
+// according to following documents
+//
+// Internet ASSIGNED NUMBERS (RFC1700) and its successors:
+// http://www.iana.org/assignments/protocol-numbers
+// http://www.iana.org/assignments/port-numbers
+// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
+//
+
+// Definitions related to sockets: types, address families, options.
+
+// Types
+
+// Flags for socket() and accept4()
+
+// Option flags per-socket.
+
+// Socket options are passed using a signed integer, but it is also rare
+// for more than one to ever be passed at the same time with setsockopt
+// and only one at a time can be retrieved with getsockopt.
+//
+// Since the lower numbers cannot be renumbered for compatibility reasons,
+// it would seem that we need to start a new number space (0x40000000 -
+// 0x7fffffff) for those that don't need to be stored as a bit flag
+// somewhere. This limits the flag options to 30 but that seems to be
+// plenty, anyway. 0x40000000 is reserved for future use.
+
+// N.B.: The following definition is present only for compatibility
+// with release 3.0. It will disappear in later releases.
+
+// Additional options, not kept in so_options.
+
+// "Socket"-level control message types:
+
+// Socket filter options
+
+// Structure returned by FIL_LIST
+type Fil_info = struct {
+ Ffi_flags int32
+ Ffi_pos int32
+ Ffi_name [32]int8
+} /* socket.h:225:1 */
+
+// Structure used for manipulating linger option.
+type Linger = struct {
+ Fl_onoff int32
+ Fl_linger int32
+} /* socket.h:254:1 */
+
+// Levels for (get/set)sockopt() that don't apply to a specific protocol.
+
+// Address families.
+//
+// Some of these constant names are copied for the DTrace IP provider in
+// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
+// in sync.
+
+// Protocol families, same as address families for now.
+
+// Maximum queue length specifiable by listen.
+
+// Message header for recvmsg and sendmsg calls.
+type Msghdr = struct {
+ Fmsg_name uintptr
+ Fmsg_namelen uint32
+ 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:365:1 */
+
+// with left over data
+
+// Obsolete but kept for compilation compatibility. Use IOV_MAX.
+
+// Added for XPGv2 compliance
+
+type Cmsghdr = struct {
+ Fcmsg_len uint32
+ Fcmsg_level int32
+ Fcmsg_type int32
+} /* socket.h:462:1 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type Hostent = struct {
+ Fh_name uintptr
+ Fh_aliases uintptr
+ Fh_addrtype int32
+ Fh_length int32
+ Fh_addr_list uintptr
+} /* netdb.h:96:1 */
+
+// addrinfo introduced with IPv6 for Protocol-Independent Hostname
+// and Service Name Translation.
+
+type Addrinfo = struct {
+ Fai_flags int32
+ Fai_family int32
+ Fai_socktype int32
+ Fai_protocol int32
+ Fai_addrlen uint32
+ F__ccgo_pad1 [4]byte
+ Fai_canonname uintptr
+ Fai_addr uintptr
+ Fai_next uintptr
+} /* netdb.h:112:1 */
+
+// The flag 0x8000 is currently reserved for private use between libnsl and
+// libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
+// addrinfo flags
+
+// getipnodebyname() flags
+
+// These were defined in RFC 2553 but not SUSv3
+// or RFC 3493 which obsoleted 2553.
+
+// addrinfo errors
+
+// getnameinfo flags
+
+// Not listed in any standards document
+
+// getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493
+
+// Scope delimit character
+
+// Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
+// and algorithms.
+type Ipsecalgent = struct {
+ Fa_names uintptr
+ Fa_proto_num int32
+ Fa_alg_num int32
+ Fa_mech_name uintptr
+ Fa_block_sizes uintptr
+ Fa_key_sizes uintptr
+ Fa_key_increment int32
+ F__ccgo_pad1 [4]byte
+ Fa_mech_params uintptr
+ Fa_alg_flags int32
+ F__ccgo_pad2 [4]byte
+} /* netdb.h:195:9 */
+
+// The flag 0x8000 is currently reserved for private use between libnsl and
+// libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
+// addrinfo flags
+
+// getipnodebyname() flags
+
+// These were defined in RFC 2553 but not SUSv3
+// or RFC 3493 which obsoleted 2553.
+
+// addrinfo errors
+
+// getnameinfo flags
+
+// Not listed in any standards document
+
+// getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493
+
+// Scope delimit character
+
+// Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
+// and algorithms.
+type Ipsecalgent_t = Ipsecalgent /* netdb.h:205:3 */
+
+// well-known IPsec protocol numbers
+
+// Assumption here is that a network number
+// fits in 32 bits -- probably a poor one.
+type Netent = struct {
+ Fn_name uintptr
+ Fn_aliases uintptr
+ Fn_addrtype int32
+ Fn_net uint32
+} /* netdb.h:217:1 */
+
+type Protoent = struct {
+ Fp_name uintptr
+ Fp_aliases uintptr
+ Fp_proto int32
+ F__ccgo_pad1 [4]byte
+} /* netdb.h:224:1 */
+
+type Servent = struct {
+ Fs_name uintptr
+ Fs_aliases uintptr
+ Fs_port int32
+ F__ccgo_pad1 [4]byte
+ Fs_proto uintptr
+} /* netdb.h:230:1 */
+
+// Error return codes from gethostbyname() and gethostbyaddr()
+// (left in extern int h_errno).
+
+// BIND
+// End BIND
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go b/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go
index a995ad8d0..3fbd76404 100644
--- a/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go
+++ b/vendor/modernc.org/libc/netdb/netdb_linux_loong64.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 -ignore-unsupported-alignment -o netdb/netdb_linux_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_linux_loong64.go -pkgname netdb', DO NOT EDIT.
package netdb
@@ -15,55 +15,56 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- AF_ALG = 38 // socket.h:133:1:
- AF_APPLETALK = 5 // socket.h:99:1:
- AF_ASH = 18 // socket.h:113:1:
- AF_ATMPVC = 8 // socket.h:102:1:
- AF_ATMSVC = 20 // socket.h:115:1:
- AF_AX25 = 3 // socket.h:97:1:
- AF_BLUETOOTH = 31 // socket.h:126:1:
- AF_BRIDGE = 7 // socket.h:101:1:
- AF_CAIF = 37 // socket.h:132:1:
- AF_CAN = 29 // socket.h:124:1:
- AF_DECnet = 12 // socket.h:106:1:
- AF_ECONET = 19 // socket.h:114:1:
- AF_FILE = 1 // socket.h:95:1:
- AF_IB = 27 // socket.h:122:1:
- AF_IEEE802154 = 36 // socket.h:131:1:
- AF_INET = 2 // socket.h:96:1:
- AF_INET6 = 10 // socket.h:104:1:
- AF_IPX = 4 // socket.h:98:1:
- AF_IRDA = 23 // socket.h:118:1:
- AF_ISDN = 34 // socket.h:129:1:
- AF_IUCV = 32 // socket.h:127:1:
- AF_KCM = 41 // socket.h:136:1:
- AF_KEY = 15 // socket.h:109:1:
- AF_LLC = 26 // socket.h:121:1:
- AF_LOCAL = 1 // socket.h:93:1:
- AF_MAX = 45 // socket.h:140:1:
- AF_MPLS = 28 // socket.h:123:1:
- AF_NETBEUI = 13 // socket.h:107:1:
- AF_NETLINK = 16 // socket.h:110:1:
- AF_NETROM = 6 // socket.h:100:1:
- AF_NFC = 39 // socket.h:134:1:
- AF_PACKET = 17 // socket.h:112:1:
- AF_PHONET = 35 // socket.h:130:1:
- AF_PPPOX = 24 // socket.h:119:1:
- AF_QIPCRTR = 42 // socket.h:137:1:
- AF_RDS = 21 // socket.h:116:1:
- AF_ROSE = 11 // socket.h:105:1:
- AF_ROUTE = 16 // socket.h:111:1:
- AF_RXRPC = 33 // socket.h:128:1:
- AF_SECURITY = 14 // socket.h:108:1:
- AF_SMC = 43 // socket.h:138:1:
- AF_SNA = 22 // socket.h:117:1:
- AF_TIPC = 30 // socket.h:125:1:
- AF_UNIX = 1 // socket.h:94:1:
- AF_UNSPEC = 0 // socket.h:92:1:
- AF_VSOCK = 40 // socket.h:135:1:
- AF_WANPIPE = 25 // socket.h:120:1:
- AF_X25 = 9 // socket.h:103:1:
- AF_XDP = 44 // socket.h:139:1:
+ AF_ALG = 38 // socket.h:134:1:
+ AF_APPLETALK = 5 // socket.h:100:1:
+ AF_ASH = 18 // socket.h:114:1:
+ AF_ATMPVC = 8 // socket.h:103:1:
+ AF_ATMSVC = 20 // socket.h:116:1:
+ AF_AX25 = 3 // socket.h:98:1:
+ AF_BLUETOOTH = 31 // socket.h:127:1:
+ AF_BRIDGE = 7 // socket.h:102:1:
+ AF_CAIF = 37 // socket.h:133:1:
+ AF_CAN = 29 // socket.h:125:1:
+ AF_DECnet = 12 // socket.h:107:1:
+ AF_ECONET = 19 // socket.h:115:1:
+ AF_FILE = 1 // socket.h:96:1:
+ AF_IB = 27 // socket.h:123:1:
+ AF_IEEE802154 = 36 // socket.h:132:1:
+ AF_INET = 2 // socket.h:97:1:
+ AF_INET6 = 10 // socket.h:105:1:
+ AF_IPX = 4 // socket.h:99:1:
+ AF_IRDA = 23 // socket.h:119:1:
+ AF_ISDN = 34 // socket.h:130:1:
+ AF_IUCV = 32 // socket.h:128:1:
+ AF_KCM = 41 // socket.h:137:1:
+ AF_KEY = 15 // socket.h:110:1:
+ AF_LLC = 26 // socket.h:122:1:
+ AF_LOCAL = 1 // socket.h:94:1:
+ AF_MAX = 46 // socket.h:142:1:
+ AF_MCTP = 45 // socket.h:141:1:
+ AF_MPLS = 28 // socket.h:124:1:
+ AF_NETBEUI = 13 // socket.h:108:1:
+ AF_NETLINK = 16 // socket.h:111:1:
+ AF_NETROM = 6 // socket.h:101:1:
+ AF_NFC = 39 // socket.h:135:1:
+ AF_PACKET = 17 // socket.h:113:1:
+ AF_PHONET = 35 // socket.h:131:1:
+ AF_PPPOX = 24 // socket.h:120:1:
+ AF_QIPCRTR = 42 // socket.h:138:1:
+ AF_RDS = 21 // socket.h:117:1:
+ AF_ROSE = 11 // socket.h:106:1:
+ AF_ROUTE = 16 // socket.h:112:1:
+ AF_RXRPC = 33 // socket.h:129:1:
+ AF_SECURITY = 14 // socket.h:109:1:
+ AF_SMC = 43 // socket.h:139:1:
+ AF_SNA = 22 // socket.h:118:1:
+ AF_TIPC = 30 // socket.h:126:1:
+ AF_UNIX = 1 // socket.h:95:1:
+ AF_UNSPEC = 0 // socket.h:93:1:
+ AF_VSOCK = 40 // socket.h:136:1:
+ AF_WANPIPE = 25 // socket.h:121:1:
+ AF_X25 = 9 // socket.h:104:1:
+ AF_XDP = 44 // socket.h:140:1:
AI_ADDRCONFIG = 0x0020 // netdb.h:601:1:
AI_ALL = 0x0010 // netdb.h:600:1:
AI_CANONNAME = 0x0002 // netdb.h:597:1:
@@ -87,108 +88,110 @@ const (
FIOGETOWN = 0x8903 // sockios.h:8:1:
FIOSETOWN = 0x8901 // sockios.h:6:1:
HOST_NOT_FOUND = 1 // netdb.h:63:1:
- INET6_ADDRSTRLEN = 46 // in.h:234:1:
- INET_ADDRSTRLEN = 16 // in.h:233:1:
- IN_CLASSA_HOST = 16777215 // in.h:169:1:
- IN_CLASSA_MAX = 128 // in.h:170:1:
- IN_CLASSA_NET = 0xff000000 // in.h:167:1:
- IN_CLASSA_NSHIFT = 24 // in.h:168:1:
- IN_CLASSB_HOST = 65535 // in.h:175:1:
- IN_CLASSB_MAX = 65536 // in.h:176:1:
- IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
- IN_CLASSB_NSHIFT = 16 // in.h:174:1:
- IN_CLASSC_HOST = 255 // in.h:181:1:
- IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
- IN_CLASSC_NSHIFT = 8 // in.h:180:1:
- IN_LOOPBACKNET = 127 // in.h:197:1:
+ INET6_ADDRSTRLEN = 46 // in.h:243:1:
+ INET_ADDRSTRLEN = 16 // in.h:242:1:
+ IN_CLASSA_HOST = 16777215 // in.h:175:1:
+ IN_CLASSA_MAX = 128 // in.h:176:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:173:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:174:1:
+ IN_CLASSB_HOST = 65535 // in.h:181:1:
+ IN_CLASSB_MAX = 65536 // in.h:182:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:179:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:180:1:
+ IN_CLASSC_HOST = 255 // in.h:187:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:185:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:186:1:
+ IN_LOOPBACKNET = 127 // in.h:206:1:
IPPORT_RESERVED1 = 1024 // netdb.h:79:1:
- IPV6_2292DSTOPTS = 4 // in.h:171:1:
- IPV6_2292HOPLIMIT = 8 // in.h:175:1:
- IPV6_2292HOPOPTS = 3 // in.h:170:1:
- IPV6_2292PKTINFO = 2 // in.h:169:1:
- IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
- IPV6_2292RTHDR = 5 // in.h:172:1:
- IPV6_ADDRFORM = 1 // in.h:168:1:
- IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
- IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
- IPV6_AUTHHDR = 10 // in.h:180:1:
- IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
- IPV6_CHECKSUM = 7 // in.h:174:1:
- IPV6_DONTFRAG = 62 // in.h:214:1:
- IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
- IPV6_DSTOPTS = 59 // in.h:211:1:
- IPV6_FREEBIND = 78 // in.h:233:1:
- IPV6_HDRINCL = 36 // in.h:198:1:
- IPV6_HOPLIMIT = 52 // in.h:204:1:
- IPV6_HOPOPTS = 54 // in.h:206:1:
- IPV6_IPSEC_POLICY = 34 // in.h:196:1:
- IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
- IPV6_JOIN_GROUP = 20 // in.h:185:1:
- IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
- IPV6_LEAVE_GROUP = 21 // in.h:186:1:
- IPV6_MINHOPCOUNT = 73 // in.h:226:1:
- IPV6_MTU = 24 // in.h:189:1:
- IPV6_MTU_DISCOVER = 23 // in.h:188:1:
- IPV6_MULTICAST_ALL = 29 // in.h:194:1:
- IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
- IPV6_MULTICAST_IF = 17 // in.h:182:1:
- IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
- IPV6_NEXTHOP = 9 // in.h:179:1:
- IPV6_ORIGDSTADDR = 74 // in.h:228:1:
- IPV6_PATHMTU = 61 // in.h:213:1:
- IPV6_PKTINFO = 50 // in.h:202:1:
- IPV6_PMTUDISC_DO = 2 // in.h:246:1:
- IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
- IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
- IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
- IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
- IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
- IPV6_RECVDSTOPTS = 58 // in.h:210:1:
- IPV6_RECVERR = 25 // in.h:190:1:
- IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
- IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
- IPV6_RECVHOPOPTS = 53 // in.h:205:1:
- IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
- IPV6_RECVPATHMTU = 60 // in.h:212:1:
- IPV6_RECVPKTINFO = 49 // in.h:201:1:
- IPV6_RECVRTHDR = 56 // in.h:208:1:
- IPV6_RECVTCLASS = 66 // in.h:217:1:
- IPV6_ROUTER_ALERT = 22 // in.h:187:1:
- IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
- IPV6_RTHDR = 57 // in.h:209:1:
- IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
- IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
- IPV6_RTHDR_STRICT = 1 // in.h:257:1:
- IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
- IPV6_RXDSTOPTS = 59 // in.h:241:1:
- IPV6_RXHOPOPTS = 54 // in.h:240:1:
- IPV6_TCLASS = 67 // in.h:218:1:
- IPV6_TRANSPARENT = 75 // in.h:230:1:
- IPV6_UNICAST_HOPS = 16 // in.h:181:1:
- IPV6_UNICAST_IF = 76 // in.h:231:1:
- IPV6_V6ONLY = 26 // in.h:191:1:
- IPV6_XFRM_POLICY = 35 // in.h:197:1:
- IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
- IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
+ IPV6_2292DSTOPTS = 4 // in.h:166:1:
+ IPV6_2292HOPLIMIT = 8 // in.h:170:1:
+ IPV6_2292HOPOPTS = 3 // in.h:165:1:
+ IPV6_2292PKTINFO = 2 // in.h:164:1:
+ IPV6_2292PKTOPTIONS = 6 // in.h:168:1:
+ IPV6_2292RTHDR = 5 // in.h:167:1:
+ IPV6_ADDRFORM = 1 // in.h:163:1:
+ IPV6_ADDR_PREFERENCES = 72 // in.h:219:1:
+ IPV6_ADD_MEMBERSHIP = 20 // in.h:233:1:
+ IPV6_AUTHHDR = 10 // in.h:175:1:
+ IPV6_AUTOFLOWLABEL = 70 // in.h:216:1:
+ IPV6_CHECKSUM = 7 // in.h:169:1:
+ IPV6_DONTFRAG = 62 // in.h:210:1:
+ IPV6_DROP_MEMBERSHIP = 21 // in.h:234:1:
+ IPV6_DSTOPTS = 59 // in.h:207:1:
+ IPV6_FREEBIND = 78 // in.h:229:1:
+ IPV6_HDRINCL = 36 // in.h:194:1:
+ IPV6_HOPLIMIT = 52 // in.h:200:1:
+ IPV6_HOPOPTS = 54 // in.h:202:1:
+ IPV6_IPSEC_POLICY = 34 // in.h:192:1:
+ IPV6_JOIN_ANYCAST = 27 // in.h:187:1:
+ IPV6_JOIN_GROUP = 20 // in.h:180:1:
+ IPV6_LEAVE_ANYCAST = 28 // in.h:188:1:
+ IPV6_LEAVE_GROUP = 21 // in.h:181:1:
+ IPV6_MINHOPCOUNT = 73 // in.h:222:1:
+ IPV6_MTU = 24 // in.h:184:1:
+ IPV6_MTU_DISCOVER = 23 // in.h:183:1:
+ IPV6_MULTICAST_ALL = 29 // in.h:189:1:
+ IPV6_MULTICAST_HOPS = 18 // in.h:178:1:
+ IPV6_MULTICAST_IF = 17 // in.h:177:1:
+ IPV6_MULTICAST_LOOP = 19 // in.h:179:1:
+ IPV6_NEXTHOP = 9 // in.h:174:1:
+ IPV6_ORIGDSTADDR = 74 // in.h:224:1:
+ IPV6_PATHMTU = 61 // in.h:209:1:
+ IPV6_PKTINFO = 50 // in.h:198:1:
+ IPV6_PMTUDISC_DO = 2 // in.h:242:1:
+ IPV6_PMTUDISC_DONT = 0 // in.h:240:1:
+ IPV6_PMTUDISC_INTERFACE = 4 // in.h:244:1:
+ IPV6_PMTUDISC_OMIT = 5 // in.h:245:1:
+ IPV6_PMTUDISC_PROBE = 3 // in.h:243:1:
+ IPV6_PMTUDISC_WANT = 1 // in.h:241:1:
+ IPV6_RECVDSTOPTS = 58 // in.h:206:1:
+ IPV6_RECVERR = 25 // in.h:185:1:
+ IPV6_RECVERR_RFC4884 = 31 // in.h:191:1:
+ IPV6_RECVFRAGSIZE = 77 // in.h:228:1:
+ IPV6_RECVHOPLIMIT = 51 // in.h:199:1:
+ IPV6_RECVHOPOPTS = 53 // in.h:201:1:
+ IPV6_RECVORIGDSTADDR = 74 // in.h:225:1:
+ IPV6_RECVPATHMTU = 60 // in.h:208:1:
+ IPV6_RECVPKTINFO = 49 // in.h:197:1:
+ IPV6_RECVRTHDR = 56 // in.h:204:1:
+ IPV6_RECVTCLASS = 66 // in.h:213:1:
+ IPV6_ROUTER_ALERT = 22 // in.h:182:1:
+ IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:190:1:
+ IPV6_RTHDR = 57 // in.h:205:1:
+ IPV6_RTHDRDSTOPTS = 55 // in.h:203:1:
+ IPV6_RTHDR_LOOSE = 0 // in.h:252:1:
+ IPV6_RTHDR_STRICT = 1 // in.h:253:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:255:1:
+ IPV6_RXDSTOPTS = 59 // in.h:237:1:
+ IPV6_RXHOPOPTS = 54 // in.h:236:1:
+ IPV6_TCLASS = 67 // in.h:214:1:
+ IPV6_TRANSPARENT = 75 // in.h:226:1:
+ IPV6_UNICAST_HOPS = 16 // in.h:176:1:
+ IPV6_UNICAST_IF = 76 // in.h:227:1:
+ IPV6_V6ONLY = 26 // in.h:186:1:
+ IPV6_XFRM_POLICY = 35 // in.h:193:1:
+ IP_ADD_MEMBERSHIP = 35 // in.h:122:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:126:1:
IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
- IP_BLOCK_SOURCE = 38 // in.h:124:1:
+ IP_BLOCK_SOURCE = 38 // in.h:125:1:
IP_CHECKSUM = 23 // in.h:102:1:
- IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
- IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
- IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
- IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:138:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:137:1:
+ IP_DROP_MEMBERSHIP = 36 // in.h:123:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:127:1:
IP_FREEBIND = 15 // in.h:89:1:
IP_HDRINCL = 3 // in.h:48:1:
IP_IPSEC_POLICY = 16 // in.h:90:1:
- IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
+ IP_LOCAL_PORT_RANGE = 51 // in.h:131:1:
+ IP_MAX_MEMBERSHIPS = 20 // in.h:139:1:
IP_MINTTL = 21 // in.h:100:1:
- IP_MSFILTER = 41 // in.h:127:1:
+ IP_MSFILTER = 41 // in.h:128:1:
IP_MTU = 14 // in.h:88:1:
IP_MTU_DISCOVER = 10 // in.h:84:1:
- IP_MULTICAST_ALL = 49 // in.h:128:1:
- IP_MULTICAST_IF = 32 // in.h:118:1:
- IP_MULTICAST_LOOP = 34 // in.h:120:1:
- IP_MULTICAST_TTL = 33 // in.h:119:1:
+ IP_MULTICAST_ALL = 49 // in.h:129:1:
+ IP_MULTICAST_IF = 32 // in.h:119:1:
+ IP_MULTICAST_LOOP = 34 // in.h:121:1:
+ IP_MULTICAST_TTL = 33 // in.h:120:1:
IP_NODEFRAG = 22 // in.h:101:1:
IP_OPTIONS = 4 // in.h:47:1:
IP_ORIGDSTADDR = 20 // in.h:97:1:
@@ -196,13 +199,15 @@ const (
IP_PKTINFO = 8 // in.h:81:1:
IP_PKTOPTIONS = 9 // in.h:82:1:
IP_PMTUDISC = 10 // in.h:83:1:
- IP_PMTUDISC_DO = 2 // in.h:109:1:
- IP_PMTUDISC_DONT = 0 // in.h:107:1:
- IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
- IP_PMTUDISC_OMIT = 5 // in.h:116:1:
- IP_PMTUDISC_PROBE = 3 // in.h:110:1:
- IP_PMTUDISC_WANT = 1 // in.h:108:1:
+ IP_PMTUDISC_DO = 2 // in.h:110:1:
+ IP_PMTUDISC_DONT = 0 // in.h:108:1:
+ IP_PMTUDISC_INTERFACE = 4 // in.h:115:1:
+ IP_PMTUDISC_OMIT = 5 // in.h:117:1:
+ IP_PMTUDISC_PROBE = 3 // in.h:111:1:
+ IP_PMTUDISC_WANT = 1 // in.h:109:1:
+ IP_PROTOCOL = 52 // in.h:132:1:
IP_RECVERR = 11 // in.h:85:1:
+ IP_RECVERR_RFC4884 = 26 // in.h:105:1:
IP_RECVFRAGSIZE = 25 // in.h:104:1:
IP_RECVOPTS = 6 // in.h:51:1:
IP_RECVORIGDSTADDR = 20 // in.h:98:1:
@@ -214,8 +219,8 @@ const (
IP_TOS = 1 // in.h:49:1:
IP_TRANSPARENT = 19 // in.h:93:1:
IP_TTL = 2 // in.h:50:1:
- IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
- IP_UNICAST_IF = 50 // in.h:129:1:
+ IP_UNBLOCK_SOURCE = 37 // in.h:124:1:
+ IP_UNICAST_IF = 50 // in.h:130:1:
IP_XFRM_POLICY = 17 // in.h:91:1:
LITTLE_ENDIAN = 1234 // endian.h:27:1:
MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
@@ -265,7 +270,8 @@ const (
PF_KEY = 15 // socket.h:58:1:
PF_LLC = 26 // socket.h:70:1:
PF_LOCAL = 1 // socket.h:42:1:
- PF_MAX = 45 // socket.h:89:1:
+ PF_MAX = 46 // socket.h:90:1:
+ PF_MCTP = 45 // socket.h:89:1:
PF_MPLS = 28 // socket.h:72:1:
PF_NETBEUI = 13 // socket.h:56:1:
PF_NETLINK = 16 // socket.h:59:1:
@@ -289,47 +295,50 @@ const (
PF_WANPIPE = 25 // socket.h:69:1:
PF_X25 = 9 // socket.h:52:1:
PF_XDP = 44 // socket.h:88:1:
- SCM_TIMESTAMP = 29 // socket.h:140:1:
- SCM_TIMESTAMPING = 37 // socket.h:142:1:
+ SCM_TIMESTAMP = 29 // socket.h:156:1:
+ SCM_TIMESTAMPING = 37 // socket.h:158:1:
SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
- SCM_TIMESTAMPNS = 35 // socket.h:141:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:157:1:
SCM_TXTIME = 61 // socket.h:105:1:
SCM_WIFI_STATUS = 41 // socket.h:64:1:
SIOCATMARK = 0x8905 // sockios.h:10:1:
SIOCGPGRP = 0x8904 // sockios.h:9:1:
- SIOCGSTAMP = 0x8906 // sockios.h:11:1:
- SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
+ SIOCGSTAMPNS_OLD = 0x8907 // sockios.h:12:1:
+ SIOCGSTAMP_OLD = 0x8906 // sockios.h:11:1:
SIOCSPGRP = 0x8902 // sockios.h:7:1:
- SOL_AAL = 265 // socket.h:151:1:
- SOL_ALG = 279 // socket.h:165:1:
- SOL_ATM = 264 // socket.h:150:1:
- SOL_BLUETOOTH = 274 // socket.h:160:1:
- SOL_CAIF = 278 // socket.h:164:1:
- SOL_DCCP = 269 // socket.h:155:1:
- SOL_DECNET = 261 // socket.h:147:1:
- SOL_ICMPV6 = 58 // in.h:253:1:
- SOL_IP = 0 // in.h:132:1:
- SOL_IPV6 = 41 // in.h:252:1:
- SOL_IRDA = 266 // socket.h:152:1:
- SOL_IUCV = 277 // socket.h:163:1:
- SOL_KCM = 281 // socket.h:167:1:
- SOL_LLC = 268 // socket.h:154:1:
- SOL_NETBEUI = 267 // socket.h:153:1:
- SOL_NETLINK = 270 // socket.h:156:1:
- SOL_NFC = 280 // socket.h:166:1:
- SOL_PACKET = 263 // socket.h:149:1:
- SOL_PNPIPE = 275 // socket.h:161:1:
- SOL_PPPOL2TP = 273 // socket.h:159:1:
- SOL_RAW = 255 // socket.h:146:1:
- SOL_RDS = 276 // socket.h:162:1:
- SOL_RXRPC = 272 // socket.h:158:1:
+ SOL_AAL = 265 // socket.h:153:1:
+ SOL_ALG = 279 // socket.h:167:1:
+ SOL_ATM = 264 // socket.h:152:1:
+ SOL_BLUETOOTH = 274 // socket.h:162:1:
+ SOL_CAIF = 278 // socket.h:166:1:
+ SOL_DCCP = 269 // socket.h:157:1:
+ SOL_DECNET = 261 // socket.h:149:1:
+ SOL_ICMPV6 = 58 // in.h:249:1:
+ SOL_IP = 0 // in.h:135:1:
+ SOL_IPV6 = 41 // in.h:248:1:
+ SOL_IRDA = 266 // socket.h:154:1:
+ SOL_IUCV = 277 // socket.h:165:1:
+ SOL_KCM = 281 // socket.h:169:1:
+ SOL_LLC = 268 // socket.h:156:1:
+ SOL_MCTP = 285 // socket.h:173:1:
+ SOL_MPTCP = 284 // socket.h:172:1:
+ SOL_NETBEUI = 267 // socket.h:155:1:
+ SOL_NETLINK = 270 // socket.h:158:1:
+ SOL_NFC = 280 // socket.h:168:1:
+ SOL_PACKET = 263 // socket.h:151:1:
+ SOL_PNPIPE = 275 // socket.h:163:1:
+ SOL_PPPOL2TP = 273 // socket.h:161:1:
+ SOL_RAW = 255 // socket.h:148:1:
+ SOL_RDS = 276 // socket.h:164:1:
+ SOL_RXRPC = 272 // socket.h:160:1:
+ SOL_SMC = 286 // socket.h:174:1:
SOL_SOCKET = 1 // socket.h:9:1:
- SOL_TIPC = 271 // socket.h:157:1:
- SOL_TLS = 282 // socket.h:168:1:
- SOL_X25 = 262 // socket.h:148:1:
- SOL_XDP = 283 // socket.h:169:1:
- SOMAXCONN = 4096 // socket.h:172:1:
+ SOL_TIPC = 271 // socket.h:159:1:
+ SOL_TLS = 282 // socket.h:170:1:
+ SOL_X25 = 262 // socket.h:150:1:
+ SOL_XDP = 283 // socket.h:171:1:
+ SOMAXCONN = 4096 // socket.h:177:1:
SO_ACCEPTCONN = 30 // socket.h:51:1:
SO_ATTACH_BPF = 50 // socket.h:82:1:
SO_ATTACH_FILTER = 26 // socket.h:45:1:
@@ -340,7 +349,9 @@ const (
SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
SO_BROADCAST = 6 // socket.h:16:1:
SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUF_LOCK = 72 // socket.h:127:1:
SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_BUSY_POLL_BUDGET = 70 // socket.h:123:1:
SO_CNX_ADVICE = 53 // socket.h:88:1:
SO_COOKIE = 57 // socket.h:96:1:
SO_DEBUG = 1 // socket.h:11:1:
@@ -359,24 +370,30 @@ const (
SO_MARK = 36 // socket.h:56:1:
SO_MAX_PACING_RATE = 47 // socket.h:76:1:
SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NETNS_COOKIE = 71 // socket.h:125:1:
SO_NOFCS = 43 // socket.h:68:1:
SO_NO_CHECK = 11 // socket.h:23:1:
SO_OOBINLINE = 10 // socket.h:22:1:
SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSPIDFD = 76 // socket.h:135:1:
SO_PASSSEC = 34 // socket.h:54:1:
SO_PEEK_OFF = 42 // socket.h:65:1:
SO_PEERCRED = 17 // socket.h:30:1:
SO_PEERGROUPS = 59 // socket.h:100:1:
SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERPIDFD = 77 // socket.h:136:1:
SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PREFER_BUSY_POLL = 69 // socket.h:122:1:
SO_PRIORITY = 12 // socket.h:24:1:
SO_PROTOCOL = 38 // socket.h:58:1:
SO_RCVBUF = 8 // socket.h:18:1:
SO_RCVBUFFORCE = 33 // socket.h:20:1:
SO_RCVLOWAT = 18 // socket.h:31:1:
- SO_RCVTIMEO = 20 // socket.h:129:1:
+ SO_RCVMARK = 75 // socket.h:133:1:
+ SO_RCVTIMEO = 20 // socket.h:145:1:
SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_RESERVE_MEM = 73 // socket.h:129:1:
SO_REUSEADDR = 2 // socket.h:12:1:
SO_REUSEPORT = 15 // socket.h:27:1:
SO_RXQ_OVFL = 40 // socket.h:61:1:
@@ -387,29 +404,31 @@ const (
SO_SNDBUF = 7 // socket.h:17:1:
SO_SNDBUFFORCE = 32 // socket.h:19:1:
SO_SNDLOWAT = 19 // socket.h:32:1:
- SO_SNDTIMEO = 21 // socket.h:130:1:
+ SO_SNDTIMEO = 21 // socket.h:146:1:
SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
- SO_TIMESTAMP = 29 // socket.h:125:1:
- SO_TIMESTAMPING = 37 // socket.h:127:1:
+ SO_TIMESTAMP = 29 // socket.h:141:1:
+ SO_TIMESTAMPING = 37 // socket.h:143:1:
SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
- SO_TIMESTAMPNS = 35 // socket.h:126:1:
+ SO_TIMESTAMPNS = 35 // socket.h:142:1:
SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXREHASH = 74 // socket.h:131:1:
SO_TXTIME = 61 // socket.h:104:1:
SO_TYPE = 3 // socket.h:13:1:
SO_WIFI_STATUS = 41 // socket.h:63:1:
SO_ZEROCOPY = 60 // socket.h:102:1:
TRY_AGAIN = 2 // netdb.h:64:1:
- X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
@@ -418,15 +437,26 @@ const (
X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
X_BITS_TYPES_H = 1 // types.h:24:1:
X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
X_ENDIAN_H = 1 // endian.h:19:1:
X_FEATURES_H = 1 // features.h:19:1:
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
- X_LP64 = 1 // <predefined>:284:1:
+ X_LINUX_STDDEF_H = 0 // stddef.h:3:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
X_NETDB_H = 1 // netdb.h:23:1:
X_NETINET_IN_H = 1 // in.h:19:1:
X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:43:1:
@@ -435,136 +465,33 @@ const (
X_PATH_NSSWITCH_CONF = "/etc/nsswitch.conf" // netdb.h:46:1:
X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:47:1:
X_PATH_SERVICES = "/etc/services" // netdb.h:48:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
X_RPC_NETDB_H = 1 // netdb.h:37:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
X_SS_SIZE = 128 // sockaddr.h:40:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
X_SYS_SOCKET_H = 1 // socket.h:20:1:
X_SYS_TYPES_H = 1 // types.h:23:1:
X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
-)
-
-// Standard well-known ports.
-const ( /* in.h:122:1: */
- IPPORT_ECHO = 7 // Echo service.
- IPPORT_DISCARD = 9 // Discard transmissions service.
- IPPORT_SYSTAT = 11 // System status service.
- IPPORT_DAYTIME = 13 // Time of day service.
- IPPORT_NETSTAT = 15 // Network status service.
- IPPORT_FTP = 21 // File Transfer Protocol.
- IPPORT_TELNET = 23 // Telnet protocol.
- IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
- IPPORT_TIMESERVER = 37 // Timeserver service.
- IPPORT_NAMESERVER = 42 // Domain Name Service.
- IPPORT_WHOIS = 43 // Internet Whois service.
- IPPORT_MTP = 57
-
- IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
- IPPORT_RJE = 77
- IPPORT_FINGER = 79 // Finger service.
- IPPORT_TTYLINK = 87
- IPPORT_SUPDUP = 95 // SUPDUP protocol.
-
- IPPORT_EXECSERVER = 512 // execd service.
- IPPORT_LOGINSERVER = 513 // rlogind service.
- IPPORT_CMDSERVER = 514
- IPPORT_EFSSERVER = 520
-
- // UDP ports.
- IPPORT_BIFFUDP = 512
- IPPORT_WHOSERVER = 513
- IPPORT_ROUTESERVER = 520
-
- // Ports less than this value are reserved for privileged processes.
- IPPORT_RESERVED = 1024
-
- // Ports greater this value are reserved for (non-privileged) servers.
- IPPORT_USERRESERVED = 5000
-)
-
-// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
-// The first word in the comment at the right is the data type used;
-// "bool" means a boolean value stored in an `int'.
-
-// Advanced API (RFC3542) (1).
-
-// Advanced API (RFC3542) (2).
-
-// RFC5014.
-
-// RFC5082.
-
-// Obsolete synonyms for the above.
-
-// IPV6_MTU_DISCOVER values.
-
-// Socket level values for IPv6.
-
-// Routing header options for IPv6.
-
-// Standard well-defined IP protocols.
-const ( /* in.h:40:1: */
- IPPROTO_IP = 0 // Dummy protocol for TCP.
- IPPROTO_ICMP = 1 // Internet Control Message Protocol.
- IPPROTO_IGMP = 2 // Internet Group Management Protocol.
- IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
- IPPROTO_TCP = 6 // Transmission Control Protocol.
- IPPROTO_EGP = 8 // Exterior Gateway Protocol.
- IPPROTO_PUP = 12 // PUP protocol.
- IPPROTO_UDP = 17 // User Datagram Protocol.
- IPPROTO_IDP = 22 // XNS IDP protocol.
- IPPROTO_TP = 29 // SO Transport Protocol Class 4.
- IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
- IPPROTO_IPV6 = 41 // IPv6 header.
- IPPROTO_RSVP = 46 // Reservation Protocol.
- IPPROTO_GRE = 47 // General Routing Encapsulation.
- IPPROTO_ESP = 50 // encapsulating security payload.
- IPPROTO_AH = 51 // authentication header.
- IPPROTO_MTP = 92 // Multicast Transport Protocol.
- IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
- IPPROTO_ENCAP = 98 // Encapsulation Header.
- IPPROTO_PIM = 103 // Protocol Independent Multicast.
- IPPROTO_COMP = 108 // Compression Header Protocol.
- IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
- IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
- IPPROTO_MPLS = 137 // MPLS in IP.
- IPPROTO_RAW = 255 // Raw IP packets.
- IPPROTO_MAX = 256
-)
-
-// 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.
-const ( /* in.h:99:1: */
- IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
- IPPROTO_ROUTING = 43 // IPv6 routing header.
- IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
- IPPROTO_ICMPV6 = 58 // ICMPv6.
- IPPROTO_NONE = 59 // IPv6 no next header.
- IPPROTO_DSTOPTS = 60 // IPv6 destination options.
- IPPROTO_MH = 135
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Bits in the FLAGS argument to `send', `recv', et al.
-const ( /* socket.h:200:1: */
+const ( /* socket.h:205:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
@@ -592,13 +519,13 @@ const ( /* socket.h:200:1: */
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
-const ( /* socket.h:332:1: */
+const ( /* socket.h:363:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -638,6 +565,111 @@ const ( /* socket_type.h:24:1: */
SOCK_NONBLOCK = 2048
)
+// 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.
+const ( /* in.h:105:1: */
+ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
+ IPPROTO_ROUTING = 43 // IPv6 routing header.
+ IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
+ IPPROTO_ICMPV6 = 58 // ICMPv6.
+ IPPROTO_NONE = 59 // IPv6 no next header.
+ IPPROTO_DSTOPTS = 60 // IPv6 destination options.
+ IPPROTO_MH = 135
+)
+
+// Standard well-known ports.
+const ( /* in.h:128:1: */
+ IPPORT_ECHO = 7 // Echo service.
+ IPPORT_DISCARD = 9 // Discard transmissions service.
+ IPPORT_SYSTAT = 11 // System status service.
+ IPPORT_DAYTIME = 13 // Time of day service.
+ IPPORT_NETSTAT = 15 // Network status service.
+ IPPORT_FTP = 21 // File Transfer Protocol.
+ IPPORT_TELNET = 23 // Telnet protocol.
+ IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
+ IPPORT_TIMESERVER = 37 // Timeserver service.
+ IPPORT_NAMESERVER = 42 // Domain Name Service.
+ IPPORT_WHOIS = 43 // Internet Whois service.
+ IPPORT_MTP = 57
+
+ IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
+ IPPORT_RJE = 77
+ IPPORT_FINGER = 79 // Finger service.
+ IPPORT_TTYLINK = 87
+ IPPORT_SUPDUP = 95 // SUPDUP protocol.
+
+ IPPORT_EXECSERVER = 512 // execd service.
+ IPPORT_LOGINSERVER = 513 // rlogind service.
+ IPPORT_CMDSERVER = 514
+ IPPORT_EFSSERVER = 520
+
+ // UDP ports.
+ IPPORT_BIFFUDP = 512
+ IPPORT_WHOSERVER = 513
+ IPPORT_ROUTESERVER = 520
+
+ // Ports less than this value are reserved for privileged processes.
+ IPPORT_RESERVED = 1024
+
+ // Ports greater this value are reserved for (non-privileged) servers.
+ IPPORT_USERRESERVED = 5000
+)
+
+// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+
+// Advanced API (RFC3542) (1).
+
+// Advanced API (RFC3542) (2).
+
+// RFC5014.
+
+// RFC5082.
+
+// Obsolete synonyms for the above.
+
+// IPV6_MTU_DISCOVER values.
+
+// Socket level values for IPv6.
+
+// Routing header options for IPv6.
+
+// Standard well-defined IP protocols.
+const ( /* in.h:40:1: */
+ IPPROTO_IP = 0 // Dummy protocol for TCP.
+ IPPROTO_ICMP = 1 // Internet Control Message Protocol.
+ IPPROTO_IGMP = 2 // Internet Group Management Protocol.
+ IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
+ IPPROTO_TCP = 6 // Transmission Control Protocol.
+ IPPROTO_EGP = 8 // Exterior Gateway Protocol.
+ IPPROTO_PUP = 12 // PUP protocol.
+ IPPROTO_UDP = 17 // User Datagram Protocol.
+ IPPROTO_IDP = 22 // XNS IDP protocol.
+ IPPROTO_TP = 29 // SO Transport Protocol Class 4.
+ IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
+ IPPROTO_IPV6 = 41 // IPv6 header.
+ IPPROTO_RSVP = 46 // Reservation Protocol.
+ IPPROTO_GRE = 47 // General Routing Encapsulation.
+ IPPROTO_ESP = 50 // encapsulating security payload.
+ IPPROTO_AH = 51 // authentication header.
+ IPPROTO_MTP = 92 // Multicast Transport Protocol.
+ IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
+ IPPROTO_ENCAP = 98 // Encapsulation Header.
+ IPPROTO_PIM = 103 // Protocol Independent Multicast.
+ IPPROTO_COMP = 108 // Compression Header Protocol.
+ IPPROTO_L2TP = 115 // Layer 2 Tunnelling Protocol.
+ IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
+ IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
+ IPPROTO_MPLS = 137 // MPLS in IP.
+ IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation.
+ IPPROTO_RAW = 255 // Raw IP packets.
+ IPPROTO_MPTCP = 262 // Multipath TCP connection.
+ IPPROTO_MAX = 263
+)
+
// The following constants should be used for the second parameter of
//
// `shutdown'.
@@ -665,7 +697,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -686,7 +718,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// host order and returned in network order (suitable for use in
// system calls).
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -718,6 +750,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -733,12 +767,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -779,6 +816,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -849,6 +888,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -867,9 +962,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -897,7 +998,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -918,23 +1020,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -947,6 +1050,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -967,8 +1072,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -978,6 +1083,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -1006,8 +1114,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -1038,11 +1151,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -1052,11 +1168,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1090,6 +1222,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -1103,12 +1251,29 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1125,7 +1290,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1143,7 +1308,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// <https://www.gnu.org/licenses/>.
// Define uintN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1161,7 +1326,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1180,7 +1345,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1197,11 +1362,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1218,7 +1397,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -1237,14 +1416,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -1284,8 +1463,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1299,14 +1478,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -1317,10 +1494,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1347,7 +1526,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -1359,69 +1538,70 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */
-type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */
-type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */
-type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
+type Uint8_t = uint8 /* stdint-uintn.h:24:19 */
+type Uint16_t = uint16 /* stdint-uintn.h:25:20 */
+type Uint32_t = uint32 /* stdint-uintn.h:26:20 */
+type Uint64_t = uint64 /* stdint-uintn.h:27:20 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -1436,10 +1616,10 @@ type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
// Structure for scatter/gather I/O.
type Iovec = struct {
Fiov_base uintptr
- Fiov_len Size_t
+ Fiov_len uint64
} /* struct_iovec.h:26:1 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1511,7 +1691,7 @@ type Iovec = struct {
// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
// `struct msghdr', and `struct linger' types.
// System-specific socket constants and types. Linux version.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1528,7 +1708,7 @@ type Iovec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1596,7 +1776,7 @@ type Iovec = struct {
// A null pointer constant.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1615,7 +1795,7 @@ type Iovec = struct {
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1633,7 +1813,7 @@ type Iovec = struct {
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1652,42 +1832,42 @@ type Iovec = struct {
// Never include this file directly; use <sys/types.h> instead.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1707,10 +1887,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1730,10 +1910,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1753,10 +1933,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1776,9 +1956,9 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1854,7 +2034,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1872,7 +2052,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1891,22 +2071,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1925,7 +2105,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1944,7 +2124,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1964,7 +2144,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1981,9 +2161,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1995,7 +2174,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2018,14 +2197,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2045,7 +2224,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2066,11 +2245,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -2079,25 +2258,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2116,7 +2295,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2155,7 +2334,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2170,24 +2351,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2204,9 +2370,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2223,56 +2388,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -2288,8 +2423,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2306,16 +2441,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -2328,9 +2467,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2347,6 +2503,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -2354,26 +2515,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -2416,7 +2580,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -2440,7 +2608,7 @@ type Pthread_barrierattr_t = struct {
} /* pthreadtypes.h:118:3 */
// Type for length arguments in socket calls.
-type Socklen_t = X__socklen_t /* socket.h:33:21 */
+type Socklen_t = uint32 /* socket.h:33:21 */
// Protocol families.
@@ -2455,7 +2623,7 @@ type Socklen_t = X__socklen_t /* socket.h:33:21 */
// Get the definition of the macro to define the common sockaddr members.
// Definition of struct sockaddr_* common members and sizes, generic version.
-// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// Copyright (C) 1995-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2485,41 +2653,41 @@ type Sa_family_t = uint16 /* sockaddr.h:28:28 */
// Structure describing a generic socket address.
type Sockaddr = struct {
- Fsa_family Sa_family_t
+ Fsa_family uint16
Fsa_data [14]int8
-} /* socket.h:178:1 */
+} /* socket.h:183:1 */
// Structure large enough to hold any socket address (with the historical
// exception of AF_UNIX).
type Sockaddr_storage = struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
-} /* socket.h:191:1 */
+} /* socket.h:196:1 */
// Structure describing messages sent by
//
// `sendmsg' and received by `recvmsg'.
type Msghdr = struct {
Fmsg_name uintptr
- Fmsg_namelen Socklen_t
+ Fmsg_namelen uint32
F__ccgo_pad1 [4]byte
Fmsg_iov uintptr
- Fmsg_iovlen Size_t
+ Fmsg_iovlen uint64
Fmsg_control uintptr
- Fmsg_controllen Size_t
+ Fmsg_controllen uint64
Fmsg_flags int32
F__ccgo_pad2 [4]byte
-} /* socket.h:257:1 */
+} /* socket.h:262:1 */
// Structure used for storage of ancillary data object information.
type Cmsghdr = struct {
F__ccgo_pad1 [0]uint64
- Fcmsg_len Size_t
+ Fcmsg_len uint64
Fcmsg_level int32
Fcmsg_type int32
-} /* socket.h:275:1 */
+} /* socket.h:280:1 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -2527,6 +2695,31 @@ type Cmsghdr = struct {
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// *
+// __struct_group() - Create a mirrored named and anonyomous struct
+//
+// @TAG: The tag name for the named sub-struct (usually empty)
+// @NAME: The identifier name of the mirrored sub-struct
+// @ATTRS: Any struct attributes (usually empty)
+// @MEMBERS: The member declarations for the mirrored structs
+//
+// Used to create an anonymous union of two structs with identical layout
+// and size: one anonymous and one named. The former's members can be used
+// normally without sub-struct naming, and the latter can be used to
+// reason about the start, end, and size of the group of struct members.
+// The named struct can also be explicitly tagged for layer reuse, as well
+// as both having struct attributes appended.
+
+// *
+// __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+//
+// @TYPE: The type of each flexible array element
+// @NAME: The name of the flexible array member
+//
+// In order to have a flexible array member in a union or alone in a
+// struct, it needs to be wrapped in an anonymous struct with at least 1
+// named member, but that member can be empty.
+
// This allows for 1024 file descriptors: if NR_OPEN is ever grown
// beyond that you'll have to change this too. But 1024 fd's seem to be
// enough even for such "real" unices like OSF/1, so hopefully this is
@@ -2549,28 +2742,14 @@ type X__kernel_key_t = int32 /* posix_types.h:33:13 */
type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// This file is generally used by user-level software, so you need to
-// be a little careful about namespace pollution etc. Also, we cannot
-// assume GCC is being used.
-
-type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
-type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
-
-type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
-
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// There seems to be no way of detecting this automatically from user
-// space, so 64 bit architectures should override this in their
-// bitsperlong.h. In particular, an architecture that supports
-// both 32 and 64 bit user space must not rely on CONFIG_64BIT
-// to decide it, but rather check a compiler provided macro.
+// In order to keep safe and avoid regression, only unify uapi
+// bitsperlong.h for some archs which are using newer toolchains
+// that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
+// See the following link for more info:
+// https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
// This file is generally used by user-level software, so you need to
// be a little careful about namespace pollution etc.
@@ -2581,7 +2760,7 @@ type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
type X__kernel_long_t = int64 /* posix_types.h:15:15 */
type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
-type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+type X__kernel_ino_t = uint64 /* posix_types.h:20:26 */
type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
@@ -2592,33 +2771,38 @@ type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
-type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+type X__kernel_suseconds_t = int64 /* posix_types.h:41:26 */
type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+type X__kernel_old_uid_t = uint32 /* posix_types.h:54:24 */
+type X__kernel_old_gid_t = uint32 /* posix_types.h:55:24 */
+
+type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
+
// Most 32 bit architectures use "unsigned int" size_t,
// and all 64 bit architectures use "unsigned long" size_t.
-type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
-type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
-type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+type X__kernel_size_t = uint64 /* posix_types.h:72:26 */
+type X__kernel_ssize_t = int64 /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = int64 /* posix_types.h:74:25 */
type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
// anything below here should be completely generic
-type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
-type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
-type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
-type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
-type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
-type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
-type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
-type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
-type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
-type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
-type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+type X__kernel_off_t = int64 /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = int64 /* posix_types.h:89:25 */
+type X__kernel_time_t = int64 /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = int64 /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -2638,7 +2822,7 @@ type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
type Linger = struct {
Fl_onoff int32
Fl_linger int32
-} /* socket.h:361:1 */
+} /* socket.h:392:1 */
// This is the 4.3 BSD `struct sockaddr' format, which is used as wire
//
@@ -2651,7 +2835,7 @@ type Osockaddr = struct {
// Define some macros helping to catch buffer overflows.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2671,11 +2855,11 @@ type Osockaddr = struct {
// Never include this file directly; use <sys/types.h> instead.
// Internet address.
-type In_addr_t = Uint32_t /* in.h:30:18 */
-type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
+type In_addr_t = uint32 /* in.h:30:18 */
+type In_addr = struct{ Fs_addr uint32 } /* in.h:31:1 */
// Get system-specific definitions.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2723,26 +2907,19 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
// 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_dst struct{ Fs_addr uint32 }
Fip_opts [40]int8
-} /* in.h:142:1 */
-
-// Like `struct ip_mreq' but including interface specification by index.
-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:149:1 */
+} /* in.h:145:1 */
// Structure used for IP_PKTINFO.
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:157:1 */
+ Fipi_spec_dst struct{ Fs_addr uint32 }
+ Fipi_addr struct{ Fs_addr uint32 }
+} /* in.h:152:1 */
// Type to represent a port.
-type In_port_t = Uint16_t /* in.h:119:18 */
+type In_port_t = uint16 /* in.h:125:18 */
// Definitions of the bits in an Internet address integer.
//
@@ -2752,6 +2929,8 @@ type In_port_t = Uint16_t /* in.h:119:18 */
// Address to accept any incoming messages.
// Address to send to all hosts.
// Address indicating an error return.
+// Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
+// 7600).
// Network number for local host loopback.
// Address to loopback in software to local host.
@@ -2762,111 +2941,118 @@ type In_port_t = Uint16_t /* in.h:119:18 */
type In6_addr = struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
-} /* in.h:212:1 */
+} /* in.h:221:1 */
// ::1
// Structure describing an Internet socket address.
type Sockaddr_in = struct {
- Fsin_family Sa_family_t
- Fsin_port In_port_t
- Fsin_addr struct{ Fs_addr In_addr_t }
+ Fsin_family uint16
+ Fsin_port uint16
+ Fsin_addr struct{ Fs_addr uint32 }
Fsin_zero [8]uint8
-} /* in.h:238:1 */
+} /* in.h:247:1 */
// Ditto, for IPv6.
type Sockaddr_in6 = struct {
- Fsin6_family Sa_family_t
- Fsin6_port In_port_t
- Fsin6_flowinfo Uint32_t
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
Fsin6_addr struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
}
- Fsin6_scope_id Uint32_t
-} /* in.h:253:1 */
+ Fsin6_scope_id uint32
+} /* in.h:262:1 */
// IPv4 multicast request.
type Ip_mreq = struct {
- Fimr_multiaddr struct{ Fs_addr In_addr_t }
- Fimr_interface struct{ Fs_addr In_addr_t }
-} /* in.h:265:1 */
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_interface struct{ Fs_addr uint32 }
+} /* in.h:274:1 */
+
+// IPv4 multicast request with interface index.
+type Ip_mreqn = struct {
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_address struct{ Fs_addr uint32 }
+ Fimr_ifindex int32
+} /* in.h:284: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:274:1 */
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_interface struct{ Fs_addr uint32 }
+ Fimr_sourceaddr struct{ Fs_addr uint32 }
+} /* in.h:296:1 */
// Likewise, for IPv6.
type Ipv6_mreq = struct {
Fipv6mr_multiaddr struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
}
Fipv6mr_interface uint32
-} /* in.h:289:1 */
+} /* in.h:311:1 */
// Multicast group request.
type Group_req = struct {
- Fgr_interface Uint32_t
+ Fgr_interface uint32
F__ccgo_pad1 [4]byte
Fgr_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:301:1 */
+} /* in.h:323:1 */
type Group_source_req = struct {
- Fgsr_interface Uint32_t
+ Fgsr_interface uint32
F__ccgo_pad1 [4]byte
Fgsr_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
Fgsr_source struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:310:1 */
+} /* in.h:332:1 */
// Full-state filter operations.
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:324:1 */
+ Fimsf_multiaddr struct{ Fs_addr uint32 }
+ Fimsf_interface struct{ Fs_addr uint32 }
+ Fimsf_fmode uint32
+ Fimsf_numsrc uint32
+ Fimsf_slist [1]struct{ Fs_addr uint32 }
+} /* in.h:346:1 */
type Group_filter = struct {
- Fgf_interface Uint32_t
+ Fgf_interface uint32
F__ccgo_pad1 [4]byte
Fgf_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
- Fgf_fmode Uint32_t
- Fgf_numsrc Uint32_t
+ Fgf_fmode uint32
+ Fgf_numsrc uint32
Fgf_slist [1]struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:345:1 */
+} /* in.h:367:1 */
// Define uintN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2918,7 +3104,7 @@ type Group_filter = struct {
// added multiple inclusion protection and use of <sys/cdefs.h>.
// In GNU this file is #include'd by <netdb.h>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2935,7 +3121,7 @@ type Group_filter = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -3010,7 +3196,7 @@ type Rpcent = struct {
F__ccgo_pad1 [4]byte
} /* netdb.h:46:1 */
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -3035,7 +3221,7 @@ type Netent = struct {
Fn_name uintptr
Fn_aliases uintptr
Fn_addrtype int32
- Fn_net Uint32_t
+ Fn_net uint32
} /* netdb.h:26:1 */
// Description of data base entry for a single host.
@@ -3071,7 +3257,7 @@ type Addrinfo = struct {
Fai_family int32
Fai_socktype int32
Fai_protocol int32
- Fai_addrlen Socklen_t
+ Fai_addrlen uint32
F__ccgo_pad1 [4]byte
Fai_addr uintptr
Fai_canonname uintptr
diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_mips64le.go b/vendor/modernc.org/libc/netdb/netdb_linux_mips64le.go
new file mode 100644
index 000000000..a995ad8d0
--- /dev/null
+++ b/vendor/modernc.org/libc/netdb/netdb_linux_mips64le.go
@@ -0,0 +1,3081 @@
+// 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_linux_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 (
+ AF_ALG = 38 // socket.h:133:1:
+ AF_APPLETALK = 5 // socket.h:99:1:
+ AF_ASH = 18 // socket.h:113:1:
+ AF_ATMPVC = 8 // socket.h:102:1:
+ AF_ATMSVC = 20 // socket.h:115:1:
+ AF_AX25 = 3 // socket.h:97:1:
+ AF_BLUETOOTH = 31 // socket.h:126:1:
+ AF_BRIDGE = 7 // socket.h:101:1:
+ AF_CAIF = 37 // socket.h:132:1:
+ AF_CAN = 29 // socket.h:124:1:
+ AF_DECnet = 12 // socket.h:106:1:
+ AF_ECONET = 19 // socket.h:114:1:
+ AF_FILE = 1 // socket.h:95:1:
+ AF_IB = 27 // socket.h:122:1:
+ AF_IEEE802154 = 36 // socket.h:131:1:
+ AF_INET = 2 // socket.h:96:1:
+ AF_INET6 = 10 // socket.h:104:1:
+ AF_IPX = 4 // socket.h:98:1:
+ AF_IRDA = 23 // socket.h:118:1:
+ AF_ISDN = 34 // socket.h:129:1:
+ AF_IUCV = 32 // socket.h:127:1:
+ AF_KCM = 41 // socket.h:136:1:
+ AF_KEY = 15 // socket.h:109:1:
+ AF_LLC = 26 // socket.h:121:1:
+ AF_LOCAL = 1 // socket.h:93:1:
+ AF_MAX = 45 // socket.h:140:1:
+ AF_MPLS = 28 // socket.h:123:1:
+ AF_NETBEUI = 13 // socket.h:107:1:
+ AF_NETLINK = 16 // socket.h:110:1:
+ AF_NETROM = 6 // socket.h:100:1:
+ AF_NFC = 39 // socket.h:134:1:
+ AF_PACKET = 17 // socket.h:112:1:
+ AF_PHONET = 35 // socket.h:130:1:
+ AF_PPPOX = 24 // socket.h:119:1:
+ AF_QIPCRTR = 42 // socket.h:137:1:
+ AF_RDS = 21 // socket.h:116:1:
+ AF_ROSE = 11 // socket.h:105:1:
+ AF_ROUTE = 16 // socket.h:111:1:
+ AF_RXRPC = 33 // socket.h:128:1:
+ AF_SECURITY = 14 // socket.h:108:1:
+ AF_SMC = 43 // socket.h:138:1:
+ AF_SNA = 22 // socket.h:117:1:
+ AF_TIPC = 30 // socket.h:125:1:
+ AF_UNIX = 1 // socket.h:94:1:
+ AF_UNSPEC = 0 // socket.h:92:1:
+ AF_VSOCK = 40 // socket.h:135:1:
+ AF_WANPIPE = 25 // socket.h:120:1:
+ AF_X25 = 9 // socket.h:103:1:
+ AF_XDP = 44 // socket.h:139:1:
+ AI_ADDRCONFIG = 0x0020 // netdb.h:601:1:
+ AI_ALL = 0x0010 // netdb.h:600:1:
+ AI_CANONNAME = 0x0002 // netdb.h:597:1:
+ AI_NUMERICHOST = 0x0004 // netdb.h:598:1:
+ AI_NUMERICSERV = 0x0400 // netdb.h:613:1:
+ AI_PASSIVE = 0x0001 // netdb.h:596:1:
+ AI_V4MAPPED = 0x0008 // netdb.h:599:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ EAI_AGAIN = -3 // netdb.h:618:1:
+ EAI_BADFLAGS = -1 // netdb.h:616:1:
+ EAI_FAIL = -4 // netdb.h:619:1:
+ EAI_FAMILY = -6 // netdb.h:620:1:
+ EAI_MEMORY = -10 // netdb.h:623:1:
+ EAI_NONAME = -2 // netdb.h:617:1:
+ EAI_OVERFLOW = -12 // netdb.h:625:1:
+ EAI_SERVICE = -8 // netdb.h:622:1:
+ EAI_SOCKTYPE = -7 // netdb.h:621:1:
+ EAI_SYSTEM = -11 // netdb.h:624:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FIOGETOWN = 0x8903 // sockios.h:8:1:
+ FIOSETOWN = 0x8901 // sockios.h:6:1:
+ HOST_NOT_FOUND = 1 // netdb.h:63:1:
+ INET6_ADDRSTRLEN = 46 // in.h:234:1:
+ INET_ADDRSTRLEN = 16 // in.h:233:1:
+ IN_CLASSA_HOST = 16777215 // in.h:169:1:
+ IN_CLASSA_MAX = 128 // in.h:170:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:167:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:168:1:
+ IN_CLASSB_HOST = 65535 // in.h:175:1:
+ IN_CLASSB_MAX = 65536 // in.h:176:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:174:1:
+ IN_CLASSC_HOST = 255 // in.h:181:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:180:1:
+ IN_LOOPBACKNET = 127 // in.h:197:1:
+ IPPORT_RESERVED1 = 1024 // netdb.h:79:1:
+ IPV6_2292DSTOPTS = 4 // in.h:171:1:
+ IPV6_2292HOPLIMIT = 8 // in.h:175:1:
+ IPV6_2292HOPOPTS = 3 // in.h:170:1:
+ IPV6_2292PKTINFO = 2 // in.h:169:1:
+ IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
+ IPV6_2292RTHDR = 5 // in.h:172:1:
+ IPV6_ADDRFORM = 1 // in.h:168:1:
+ IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
+ IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
+ IPV6_AUTHHDR = 10 // in.h:180:1:
+ IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
+ IPV6_CHECKSUM = 7 // in.h:174:1:
+ IPV6_DONTFRAG = 62 // in.h:214:1:
+ IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
+ IPV6_DSTOPTS = 59 // in.h:211:1:
+ IPV6_FREEBIND = 78 // in.h:233:1:
+ IPV6_HDRINCL = 36 // in.h:198:1:
+ IPV6_HOPLIMIT = 52 // in.h:204:1:
+ IPV6_HOPOPTS = 54 // in.h:206:1:
+ IPV6_IPSEC_POLICY = 34 // in.h:196:1:
+ IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
+ IPV6_JOIN_GROUP = 20 // in.h:185:1:
+ IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
+ IPV6_LEAVE_GROUP = 21 // in.h:186:1:
+ IPV6_MINHOPCOUNT = 73 // in.h:226:1:
+ IPV6_MTU = 24 // in.h:189:1:
+ IPV6_MTU_DISCOVER = 23 // in.h:188:1:
+ IPV6_MULTICAST_ALL = 29 // in.h:194:1:
+ IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
+ IPV6_MULTICAST_IF = 17 // in.h:182:1:
+ IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
+ IPV6_NEXTHOP = 9 // in.h:179:1:
+ IPV6_ORIGDSTADDR = 74 // in.h:228:1:
+ IPV6_PATHMTU = 61 // in.h:213:1:
+ IPV6_PKTINFO = 50 // in.h:202:1:
+ IPV6_PMTUDISC_DO = 2 // in.h:246:1:
+ IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
+ IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
+ IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
+ IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
+ IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
+ IPV6_RECVDSTOPTS = 58 // in.h:210:1:
+ IPV6_RECVERR = 25 // in.h:190:1:
+ IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
+ IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
+ IPV6_RECVHOPOPTS = 53 // in.h:205:1:
+ IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
+ IPV6_RECVPATHMTU = 60 // in.h:212:1:
+ IPV6_RECVPKTINFO = 49 // in.h:201:1:
+ IPV6_RECVRTHDR = 56 // in.h:208:1:
+ IPV6_RECVTCLASS = 66 // in.h:217:1:
+ IPV6_ROUTER_ALERT = 22 // in.h:187:1:
+ IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
+ IPV6_RTHDR = 57 // in.h:209:1:
+ IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
+ IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
+ IPV6_RTHDR_STRICT = 1 // in.h:257:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
+ IPV6_RXDSTOPTS = 59 // in.h:241:1:
+ IPV6_RXHOPOPTS = 54 // in.h:240:1:
+ IPV6_TCLASS = 67 // in.h:218:1:
+ IPV6_TRANSPARENT = 75 // in.h:230:1:
+ IPV6_UNICAST_HOPS = 16 // in.h:181:1:
+ IPV6_UNICAST_IF = 76 // in.h:231:1:
+ IPV6_V6ONLY = 26 // in.h:191:1:
+ IPV6_XFRM_POLICY = 35 // in.h:197:1:
+ IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
+ IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
+ IP_BLOCK_SOURCE = 38 // in.h:124:1:
+ IP_CHECKSUM = 23 // in.h:102:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
+ IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
+ IP_FREEBIND = 15 // in.h:89:1:
+ IP_HDRINCL = 3 // in.h:48:1:
+ IP_IPSEC_POLICY = 16 // in.h:90:1:
+ IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
+ IP_MINTTL = 21 // in.h:100:1:
+ IP_MSFILTER = 41 // in.h:127:1:
+ IP_MTU = 14 // in.h:88:1:
+ IP_MTU_DISCOVER = 10 // in.h:84:1:
+ IP_MULTICAST_ALL = 49 // in.h:128:1:
+ IP_MULTICAST_IF = 32 // in.h:118:1:
+ IP_MULTICAST_LOOP = 34 // in.h:120:1:
+ IP_MULTICAST_TTL = 33 // in.h:119:1:
+ IP_NODEFRAG = 22 // in.h:101:1:
+ IP_OPTIONS = 4 // in.h:47:1:
+ IP_ORIGDSTADDR = 20 // in.h:97:1:
+ IP_PASSSEC = 18 // in.h:92:1:
+ IP_PKTINFO = 8 // in.h:81:1:
+ IP_PKTOPTIONS = 9 // in.h:82:1:
+ IP_PMTUDISC = 10 // in.h:83:1:
+ IP_PMTUDISC_DO = 2 // in.h:109:1:
+ IP_PMTUDISC_DONT = 0 // in.h:107:1:
+ IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
+ IP_PMTUDISC_OMIT = 5 // in.h:116:1:
+ IP_PMTUDISC_PROBE = 3 // in.h:110:1:
+ IP_PMTUDISC_WANT = 1 // in.h:108:1:
+ IP_RECVERR = 11 // in.h:85:1:
+ IP_RECVFRAGSIZE = 25 // in.h:104:1:
+ IP_RECVOPTS = 6 // in.h:51:1:
+ IP_RECVORIGDSTADDR = 20 // in.h:98:1:
+ IP_RECVRETOPTS = 7 // in.h:53:1:
+ IP_RECVTOS = 13 // in.h:87:1:
+ IP_RECVTTL = 12 // in.h:86:1:
+ IP_RETOPTS = 7 // in.h:54:1:
+ IP_ROUTER_ALERT = 5 // in.h:80:1:
+ IP_TOS = 1 // in.h:49:1:
+ IP_TRANSPARENT = 19 // in.h:93:1:
+ IP_TTL = 2 // in.h:50:1:
+ IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
+ IP_UNICAST_IF = 50 // in.h:129:1:
+ IP_XFRM_POLICY = 17 // in.h:91:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
+ MCAST_EXCLUDE = 0 // in.h:76:1:
+ MCAST_INCLUDE = 1 // in.h:77:1:
+ MCAST_JOIN_GROUP = 42 // in.h:66:1:
+ MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
+ MCAST_LEAVE_GROUP = 45 // in.h:69:1:
+ MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
+ MCAST_MSFILTER = 48 // in.h:72:1:
+ MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
+ NETDB_INTERNAL = -1 // netdb.h:72:1:
+ NETDB_SUCCESS = 0 // netdb.h:73:1:
+ NI_DGRAM = 16 // netdb.h:646:1:
+ NI_MAXHOST = 1025 // netdb.h:638:1:
+ NI_MAXSERV = 32 // netdb.h:639:1:
+ NI_NAMEREQD = 8 // netdb.h:645:1:
+ NI_NOFQDN = 4 // netdb.h:644:1:
+ NI_NUMERICHOST = 1 // netdb.h:642:1:
+ NI_NUMERICSERV = 2 // netdb.h:643:1:
+ NO_ADDRESS = 4 // netdb.h:74:1:
+ NO_DATA = 4 // netdb.h:68:1:
+ NO_RECOVERY = 3 // netdb.h:66:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ PF_ALG = 38 // socket.h:82:1:
+ PF_APPLETALK = 5 // socket.h:48:1:
+ PF_ASH = 18 // socket.h:62:1:
+ PF_ATMPVC = 8 // socket.h:51:1:
+ PF_ATMSVC = 20 // socket.h:64:1:
+ PF_AX25 = 3 // socket.h:46:1:
+ PF_BLUETOOTH = 31 // socket.h:75:1:
+ PF_BRIDGE = 7 // socket.h:50:1:
+ PF_CAIF = 37 // socket.h:81:1:
+ PF_CAN = 29 // socket.h:73:1:
+ PF_DECnet = 12 // socket.h:55:1:
+ PF_ECONET = 19 // socket.h:63:1:
+ PF_FILE = 1 // socket.h:44:1:
+ PF_IB = 27 // socket.h:71:1:
+ PF_IEEE802154 = 36 // socket.h:80:1:
+ PF_INET = 2 // socket.h:45:1:
+ PF_INET6 = 10 // socket.h:53:1:
+ PF_IPX = 4 // socket.h:47:1:
+ PF_IRDA = 23 // socket.h:67:1:
+ PF_ISDN = 34 // socket.h:78:1:
+ PF_IUCV = 32 // socket.h:76:1:
+ PF_KCM = 41 // socket.h:85:1:
+ PF_KEY = 15 // socket.h:58:1:
+ PF_LLC = 26 // socket.h:70:1:
+ PF_LOCAL = 1 // socket.h:42:1:
+ PF_MAX = 45 // socket.h:89:1:
+ PF_MPLS = 28 // socket.h:72:1:
+ PF_NETBEUI = 13 // socket.h:56:1:
+ PF_NETLINK = 16 // socket.h:59:1:
+ PF_NETROM = 6 // socket.h:49:1:
+ PF_NFC = 39 // socket.h:83:1:
+ PF_PACKET = 17 // socket.h:61:1:
+ PF_PHONET = 35 // socket.h:79:1:
+ PF_PPPOX = 24 // socket.h:68:1:
+ PF_QIPCRTR = 42 // socket.h:86:1:
+ PF_RDS = 21 // socket.h:65:1:
+ PF_ROSE = 11 // socket.h:54:1:
+ PF_ROUTE = 16 // socket.h:60:1:
+ PF_RXRPC = 33 // socket.h:77:1:
+ PF_SECURITY = 14 // socket.h:57:1:
+ PF_SMC = 43 // socket.h:87:1:
+ PF_SNA = 22 // socket.h:66:1:
+ PF_TIPC = 30 // socket.h:74:1:
+ PF_UNIX = 1 // socket.h:43:1:
+ PF_UNSPEC = 0 // socket.h:41:1:
+ PF_VSOCK = 40 // socket.h:84:1:
+ PF_WANPIPE = 25 // socket.h:69:1:
+ PF_X25 = 9 // socket.h:52:1:
+ PF_XDP = 44 // socket.h:88:1:
+ SCM_TIMESTAMP = 29 // socket.h:140:1:
+ SCM_TIMESTAMPING = 37 // socket.h:142:1:
+ SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
+ SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:141:1:
+ SCM_TXTIME = 61 // socket.h:105:1:
+ SCM_WIFI_STATUS = 41 // socket.h:64:1:
+ SIOCATMARK = 0x8905 // sockios.h:10:1:
+ SIOCGPGRP = 0x8904 // sockios.h:9:1:
+ SIOCGSTAMP = 0x8906 // sockios.h:11:1:
+ SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
+ SIOCSPGRP = 0x8902 // sockios.h:7:1:
+ SOL_AAL = 265 // socket.h:151:1:
+ SOL_ALG = 279 // socket.h:165:1:
+ SOL_ATM = 264 // socket.h:150:1:
+ SOL_BLUETOOTH = 274 // socket.h:160:1:
+ SOL_CAIF = 278 // socket.h:164:1:
+ SOL_DCCP = 269 // socket.h:155:1:
+ SOL_DECNET = 261 // socket.h:147:1:
+ SOL_ICMPV6 = 58 // in.h:253:1:
+ SOL_IP = 0 // in.h:132:1:
+ SOL_IPV6 = 41 // in.h:252:1:
+ SOL_IRDA = 266 // socket.h:152:1:
+ SOL_IUCV = 277 // socket.h:163:1:
+ SOL_KCM = 281 // socket.h:167:1:
+ SOL_LLC = 268 // socket.h:154:1:
+ SOL_NETBEUI = 267 // socket.h:153:1:
+ SOL_NETLINK = 270 // socket.h:156:1:
+ SOL_NFC = 280 // socket.h:166:1:
+ SOL_PACKET = 263 // socket.h:149:1:
+ SOL_PNPIPE = 275 // socket.h:161:1:
+ SOL_PPPOL2TP = 273 // socket.h:159:1:
+ SOL_RAW = 255 // socket.h:146:1:
+ SOL_RDS = 276 // socket.h:162:1:
+ SOL_RXRPC = 272 // socket.h:158:1:
+ SOL_SOCKET = 1 // socket.h:9:1:
+ SOL_TIPC = 271 // socket.h:157:1:
+ SOL_TLS = 282 // socket.h:168:1:
+ SOL_X25 = 262 // socket.h:148:1:
+ SOL_XDP = 283 // socket.h:169:1:
+ SOMAXCONN = 4096 // socket.h:172:1:
+ SO_ACCEPTCONN = 30 // socket.h:51:1:
+ SO_ATTACH_BPF = 50 // socket.h:82:1:
+ SO_ATTACH_FILTER = 26 // socket.h:45:1:
+ SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
+ SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
+ SO_BINDTODEVICE = 25 // socket.h:42:1:
+ SO_BINDTOIFINDEX = 62 // socket.h:107:1:
+ SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
+ SO_BROADCAST = 6 // socket.h:16:1:
+ SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_CNX_ADVICE = 53 // socket.h:88:1:
+ SO_COOKIE = 57 // socket.h:96:1:
+ SO_DEBUG = 1 // socket.h:11:1:
+ SO_DETACH_BPF = 27 // socket.h:83:1:
+ SO_DETACH_FILTER = 27 // socket.h:46:1:
+ SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
+ SO_DOMAIN = 39 // socket.h:59:1:
+ SO_DONTROUTE = 5 // socket.h:15:1:
+ SO_ERROR = 4 // socket.h:14:1:
+ SO_GET_FILTER = 26 // socket.h:47:1:
+ SO_INCOMING_CPU = 49 // socket.h:80:1:
+ SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
+ SO_KEEPALIVE = 9 // socket.h:21:1:
+ SO_LINGER = 13 // socket.h:25:1:
+ SO_LOCK_FILTER = 44 // socket.h:70:1:
+ SO_MARK = 36 // socket.h:56:1:
+ SO_MAX_PACING_RATE = 47 // socket.h:76:1:
+ SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NOFCS = 43 // socket.h:68:1:
+ SO_NO_CHECK = 11 // socket.h:23:1:
+ SO_OOBINLINE = 10 // socket.h:22:1:
+ SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSSEC = 34 // socket.h:54:1:
+ SO_PEEK_OFF = 42 // socket.h:65:1:
+ SO_PEERCRED = 17 // socket.h:30:1:
+ SO_PEERGROUPS = 59 // socket.h:100:1:
+ SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PRIORITY = 12 // socket.h:24:1:
+ SO_PROTOCOL = 38 // socket.h:58:1:
+ SO_RCVBUF = 8 // socket.h:18:1:
+ SO_RCVBUFFORCE = 33 // socket.h:20:1:
+ SO_RCVLOWAT = 18 // socket.h:31:1:
+ SO_RCVTIMEO = 20 // socket.h:129:1:
+ SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
+ SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_REUSEADDR = 2 // socket.h:12:1:
+ SO_REUSEPORT = 15 // socket.h:27:1:
+ SO_RXQ_OVFL = 40 // socket.h:61:1:
+ SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
+ SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
+ SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
+ SO_SNDBUF = 7 // socket.h:17:1:
+ SO_SNDBUFFORCE = 32 // socket.h:19:1:
+ SO_SNDLOWAT = 19 // socket.h:32:1:
+ SO_SNDTIMEO = 21 // socket.h:130:1:
+ SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
+ SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
+ SO_TIMESTAMP = 29 // socket.h:125:1:
+ SO_TIMESTAMPING = 37 // socket.h:127:1:
+ SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
+ SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
+ SO_TIMESTAMPNS = 35 // socket.h:126:1:
+ SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
+ SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
+ SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
+ SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXTIME = 61 // socket.h:104:1:
+ SO_TYPE = 3 // socket.h:13:1:
+ SO_WIFI_STATUS = 41 // socket.h:63:1:
+ SO_ZEROCOPY = 60 // socket.h:102:1:
+ TRY_AGAIN = 2 // netdb.h:64:1:
+ X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_NETDB_H = 1 // netdb.h:23:1:
+ X_NETINET_IN_H = 1 // in.h:19:1:
+ X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:43:1:
+ X_PATH_HOSTS = "/etc/hosts" // netdb.h:44:1:
+ X_PATH_NETWORKS = "/etc/networks" // netdb.h:45:1:
+ X_PATH_NSSWITCH_CONF = "/etc/nsswitch.conf" // netdb.h:46:1:
+ X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:47:1:
+ X_PATH_SERVICES = "/etc/services" // netdb.h:48:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RPC_NETDB_H = 1 // netdb.h:37:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_SS_SIZE = 128 // sockaddr.h:40:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_SOCKET_H = 1 // socket.h:20:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Standard well-known ports.
+const ( /* in.h:122:1: */
+ IPPORT_ECHO = 7 // Echo service.
+ IPPORT_DISCARD = 9 // Discard transmissions service.
+ IPPORT_SYSTAT = 11 // System status service.
+ IPPORT_DAYTIME = 13 // Time of day service.
+ IPPORT_NETSTAT = 15 // Network status service.
+ IPPORT_FTP = 21 // File Transfer Protocol.
+ IPPORT_TELNET = 23 // Telnet protocol.
+ IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
+ IPPORT_TIMESERVER = 37 // Timeserver service.
+ IPPORT_NAMESERVER = 42 // Domain Name Service.
+ IPPORT_WHOIS = 43 // Internet Whois service.
+ IPPORT_MTP = 57
+
+ IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
+ IPPORT_RJE = 77
+ IPPORT_FINGER = 79 // Finger service.
+ IPPORT_TTYLINK = 87
+ IPPORT_SUPDUP = 95 // SUPDUP protocol.
+
+ IPPORT_EXECSERVER = 512 // execd service.
+ IPPORT_LOGINSERVER = 513 // rlogind service.
+ IPPORT_CMDSERVER = 514
+ IPPORT_EFSSERVER = 520
+
+ // UDP ports.
+ IPPORT_BIFFUDP = 512
+ IPPORT_WHOSERVER = 513
+ IPPORT_ROUTESERVER = 520
+
+ // Ports less than this value are reserved for privileged processes.
+ IPPORT_RESERVED = 1024
+
+ // Ports greater this value are reserved for (non-privileged) servers.
+ IPPORT_USERRESERVED = 5000
+)
+
+// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+
+// Advanced API (RFC3542) (1).
+
+// Advanced API (RFC3542) (2).
+
+// RFC5014.
+
+// RFC5082.
+
+// Obsolete synonyms for the above.
+
+// IPV6_MTU_DISCOVER values.
+
+// Socket level values for IPv6.
+
+// Routing header options for IPv6.
+
+// Standard well-defined IP protocols.
+const ( /* in.h:40:1: */
+ IPPROTO_IP = 0 // Dummy protocol for TCP.
+ IPPROTO_ICMP = 1 // Internet Control Message Protocol.
+ IPPROTO_IGMP = 2 // Internet Group Management Protocol.
+ IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
+ IPPROTO_TCP = 6 // Transmission Control Protocol.
+ IPPROTO_EGP = 8 // Exterior Gateway Protocol.
+ IPPROTO_PUP = 12 // PUP protocol.
+ IPPROTO_UDP = 17 // User Datagram Protocol.
+ IPPROTO_IDP = 22 // XNS IDP protocol.
+ IPPROTO_TP = 29 // SO Transport Protocol Class 4.
+ IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
+ IPPROTO_IPV6 = 41 // IPv6 header.
+ IPPROTO_RSVP = 46 // Reservation Protocol.
+ IPPROTO_GRE = 47 // General Routing Encapsulation.
+ IPPROTO_ESP = 50 // encapsulating security payload.
+ IPPROTO_AH = 51 // authentication header.
+ IPPROTO_MTP = 92 // Multicast Transport Protocol.
+ IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
+ IPPROTO_ENCAP = 98 // Encapsulation Header.
+ IPPROTO_PIM = 103 // Protocol Independent Multicast.
+ IPPROTO_COMP = 108 // Compression Header Protocol.
+ IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
+ IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
+ IPPROTO_MPLS = 137 // MPLS in IP.
+ IPPROTO_RAW = 255 // Raw IP packets.
+ IPPROTO_MAX = 256
+)
+
+// 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.
+const ( /* in.h:99:1: */
+ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
+ IPPROTO_ROUTING = 43 // IPv6 routing header.
+ IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
+ IPPROTO_ICMPV6 = 58 // ICMPv6.
+ IPPROTO_NONE = 59 // IPv6 no next header.
+ IPPROTO_DSTOPTS = 60 // IPv6 destination options.
+ IPPROTO_MH = 135
+)
+
+// Bits in the FLAGS argument to `send', `recv', et al.
+const ( /* socket.h:200:1: */
+ MSG_OOB = 1 // Process out-of-band data.
+ MSG_PEEK = 2 // Peek at incoming messages.
+ MSG_DONTROUTE = 4 // Don't use local routing.
+ MSG_CTRUNC = 8 // Control data lost before delivery.
+ MSG_PROXY = 16 // Supply or ask second address.
+ MSG_TRUNC = 32
+ MSG_DONTWAIT = 64 // Nonblocking IO.
+ MSG_EOR = 128 // End of record.
+ MSG_WAITALL = 256 // Wait for a full request.
+ MSG_FIN = 512
+ MSG_SYN = 1024
+ MSG_CONFIRM = 2048 // Confirm path validity.
+ MSG_RST = 4096
+ MSG_ERRQUEUE = 8192 // Fetch message from error queue.
+ MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
+ MSG_MORE = 32768 // Sender will send more.
+ MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
+ MSG_BATCH = 262144 // sendmmsg: more messages coming.
+ MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
+ MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
+
+ MSG_CMSG_CLOEXEC = 1073741824
+)
+
+// Socket level message types. This must match the definitions in
+//
+// <linux/socket.h>.
+const ( /* socket.h:332:1: */
+ SCM_RIGHTS = 1
+)
+
+// Get the architecture-dependent definition of enum __socket_type.
+// Define enum __socket_type for generic Linux.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Types of sockets.
+const ( /* socket_type.h:24:1: */
+ SOCK_STREAM = 1 // Sequenced, reliable, connection-based
+ // byte streams.
+ SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
+ // of fixed maximum length.
+ SOCK_RAW = 3 // Raw protocol interface.
+ SOCK_RDM = 4 // Reliably-delivered messages.
+ SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
+ // datagrams of fixed maximum length.
+ SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
+ SOCK_PACKET = 10 // Linux specific way of getting packets
+ // at the dev level. For writing rarp and
+ // other similar things on the user level.
+
+ // Flags to be ORed into the type parameter of socket and socketpair and
+ // used for the flags parameter of paccept.
+
+ SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
+ // new descriptor(s).
+ SOCK_NONBLOCK = 2048
+)
+
+// The following constants should be used for the second parameter of
+//
+// `shutdown'.
+const ( /* socket.h:41:1: */
+ SHUT_RD = 0 // No more receptions.
+ SHUT_WR = 1 // No more transmissions.
+ SHUT_RDWR = 2
+)
+
+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 */
+
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// All data returned by the network data base library are supplied in
+// host order and returned in network order (suitable for use in
+// system calls).
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define uintN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */
+type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */
+type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */
+type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Structure for scatter/gather I/O.
+type Iovec = struct {
+ Fiov_base uintptr
+ Fiov_len Size_t
+} /* struct_iovec.h:26:1 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This operating system-specific header file defines the SOCK_*, PF_*,
+// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
+// `struct msghdr', and `struct linger' types.
+// System-specific socket constants and types. Linux version.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Type for length arguments in socket calls.
+type Socklen_t = X__socklen_t /* socket.h:33:21 */
+
+// Protocol families.
+
+// Address families.
+
+// Socket level values. Others are defined in the appropriate headers.
+//
+// XXX These definitions also should go into the appropriate headers as
+// far as they are available.
+
+// Maximum queue length specifiable by listen.
+
+// Get the definition of the macro to define the common sockaddr members.
+// Definition of struct sockaddr_* common members and sizes, generic version.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/socket.h> instead.
+
+// POSIX.1g specifies this type name for the `sa_family' member.
+type Sa_family_t = uint16 /* sockaddr.h:28:28 */
+
+// This macro is used to declare the initial common members
+// of the data types used for socket addresses, `struct sockaddr',
+// `struct sockaddr_in', `struct sockaddr_un', etc.
+
+// Size of struct sockaddr_storage.
+
+// Structure describing a generic socket address.
+type Sockaddr = struct {
+ Fsa_family Sa_family_t
+ Fsa_data [14]int8
+} /* socket.h:178:1 */
+
+// Structure large enough to hold any socket address (with the historical
+// exception of AF_UNIX).
+
+type Sockaddr_storage = struct {
+ Fss_family Sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
+} /* socket.h:191:1 */
+
+// Structure describing messages sent by
+//
+// `sendmsg' and received by `recvmsg'.
+type Msghdr = struct {
+ Fmsg_name uintptr
+ Fmsg_namelen Socklen_t
+ F__ccgo_pad1 [4]byte
+ Fmsg_iov uintptr
+ Fmsg_iovlen Size_t
+ Fmsg_control uintptr
+ Fmsg_controllen Size_t
+ Fmsg_flags int32
+ F__ccgo_pad2 [4]byte
+} /* socket.h:257:1 */
+
+// Structure used for storage of ancillary data object information.
+type Cmsghdr = struct {
+ F__ccgo_pad1 [0]uint64
+ Fcmsg_len Size_t
+ Fcmsg_level int32
+ Fcmsg_type int32
+} /* socket.h:275:1 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This allows for 1024 file descriptors: if NR_OPEN is ever grown
+// beyond that you'll have to change this too. But 1024 fd's seem to be
+// enough even for such "real" unices like OSF/1, so hopefully this is
+// one limit that doesn't have to be changed [again].
+//
+// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
+// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
+// place for them. Solved by having dummy defines in <sys/time.h>.
+
+// This macro may have been defined in <gnu/types.h>. But we always
+// use the one here.
+
+type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
+
+// Type of a signal handler.
+type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
+
+// Type of a SYSV IPC key.
+type X__kernel_key_t = int32 /* posix_types.h:33:13 */
+type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc. Also, we cannot
+// assume GCC is being used.
+
+type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
+type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
+
+type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// There seems to be no way of detecting this automatically from user
+// space, so 64 bit architectures should override this in their
+// bitsperlong.h. In particular, an architecture that supports
+// both 32 and 64 bit user space must not rely on CONFIG_64BIT
+// to decide it, but rather check a compiler provided macro.
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc.
+//
+// First the types that are often defined in different ways across
+// architectures, so that you can override them.
+
+type X__kernel_long_t = int64 /* posix_types.h:15:15 */
+type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
+
+type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+
+type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
+
+type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
+
+type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
+
+type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
+type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
+
+type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+
+type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
+
+type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
+type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+
+// Most 32 bit architectures use "unsigned int" size_t,
+// and all 64 bit architectures use "unsigned long" size_t.
+type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
+type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+
+type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
+
+// anything below here should be completely generic
+type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
+type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// Socket-level I/O control calls.
+
+// For setsockopt(2)
+
+// Security levels - as per NRL IPv6 - don't actually do anything
+
+// Socket filtering
+
+// Instruct lower device to use last 4-bytes of skb data as FCS
+
+// on 64-bit and x32, avoid the ?: operator
+
+// Structure used to manipulate the SO_LINGER option.
+type Linger = struct {
+ Fl_onoff int32
+ Fl_linger int32
+} /* 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.
+type Osockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]uint8
+} /* struct_osockaddr.h:6:1 */
+
+// Define some macros helping to catch buffer overflows.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Internet address.
+type In_addr_t = Uint32_t /* in.h:30:18 */
+type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
+
+// Get system-specific definitions.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Linux version.
+
+// If the application has already included linux/in6.h from a linux-based
+// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
+// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo
+// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly.
+// Neither the linux kernel nor glibc should break this ABI without coordination.
+// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check
+// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for
+// maximum backwards compatibility.
+
+// Options for use with `getsockopt' and `setsockopt' at the IP level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+// For BSD compatibility.
+
+// TProxy original addresses
+
+// IP_MTU_DISCOVER arguments.
+// Always use interface mtu (ignores dst pmtu) but don't set DF flag.
+// Also incoming ICMP frag_needed notifications will be ignored on
+// this socket to prevent accepting spoofed ones.
+// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented.
+
+// 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).
+type Ip_opts = struct {
+ Fip_dst struct{ Fs_addr In_addr_t }
+ Fip_opts [40]int8
+} /* in.h:142:1 */
+
+// Like `struct ip_mreq' but including interface specification by index.
+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:149:1 */
+
+// Structure used for IP_PKTINFO.
+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:157:1 */
+
+// Type to represent a port.
+type In_port_t = Uint16_t /* in.h:119:18 */
+
+// Definitions of the bits in an Internet address integer.
+//
+// On subnets, host and network parts are found according to
+// the subnet mask, not these masks.
+
+// Address to accept any incoming messages.
+// Address to send to all hosts.
+// Address indicating an error return.
+
+// Network number for local host loopback.
+// Address to loopback in software to local host.
+
+// Defines for Multicast INADDR.
+
+// IPv6 address
+type In6_addr = struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+} /* in.h:212:1 */
+
+// ::1
+
+// Structure describing an Internet socket address.
+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
+} /* in.h:238:1 */
+
+// Ditto, for IPv6.
+type Sockaddr_in6 = struct {
+ Fsin6_family Sa_family_t
+ Fsin6_port In_port_t
+ Fsin6_flowinfo Uint32_t
+ Fsin6_addr struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+ }
+ Fsin6_scope_id Uint32_t
+} /* in.h:253:1 */
+
+// IPv4 multicast request.
+type Ip_mreq = struct {
+ Fimr_multiaddr struct{ Fs_addr In_addr_t }
+ Fimr_interface struct{ Fs_addr In_addr_t }
+} /* in.h:265: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:274:1 */
+
+// Likewise, for IPv6.
+type Ipv6_mreq = struct {
+ Fipv6mr_multiaddr struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+ }
+ Fipv6mr_interface uint32
+} /* in.h:289:1 */
+
+// Multicast group request.
+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:301: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:310:1 */
+
+// Full-state filter operations.
+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:324: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:345:1 */
+
+// Define uintN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This is necessary to make this include file properly replace the
+// Sun version.
+// @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC
+// Copyright (c) 2010, Oracle America, Inc.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials
+// provided with the distribution.
+// * Neither the name of the "Oracle America, Inc." nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Cleaned up for GNU C library roland@gnu.ai.mit.edu:
+// added multiple inclusion protection and use of <sys/cdefs.h>.
+// In GNU this file is #include'd by <netdb.h>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+type Rpcent = struct {
+ Fr_name uintptr
+ Fr_aliases uintptr
+ Fr_number int32
+ F__ccgo_pad1 [4]byte
+} /* netdb.h:46:1 */
+
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <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.
+type Netent = struct {
+ Fn_name uintptr
+ Fn_aliases uintptr
+ Fn_addrtype int32
+ Fn_net Uint32_t
+} /* netdb.h:26:1 */
+
+// Description of data base entry for a single host.
+type Hostent = struct {
+ Fh_name uintptr
+ Fh_aliases uintptr
+ Fh_addrtype int32
+ Fh_length int32
+ Fh_addr_list uintptr
+} /* netdb.h:98:1 */
+
+// Description of data base entry for a single service.
+type Servent = struct {
+ Fs_name uintptr
+ Fs_aliases uintptr
+ Fs_port int32
+ F__ccgo_pad1 [4]byte
+ Fs_proto uintptr
+} /* netdb.h:255:1 */
+
+// Description of data base entry for a single service.
+type Protoent = struct {
+ Fp_name uintptr
+ Fp_aliases uintptr
+ Fp_proto int32
+ F__ccgo_pad1 [4]byte
+} /* netdb.h:324:1 */
+
+// Extension from POSIX.1:2001.
+// Structure to contain information about address of a service provider.
+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:565:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.go b/vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.go
new file mode 100644
index 000000000..eeaf813ed
--- /dev/null
+++ b/vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.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_illumos_amd64.go -pkgname in', DO NOT EDIT.
+
+package in
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go b/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go
index 953ed0943..e2da4abd5 100644
--- a/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.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 -ignore-unsupported-alignment -o netinet/in/in_linux_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_linux_loong64.go -pkgname in', DO NOT EDIT.
package in
diff --git a/vendor/modernc.org/libc/netinet/in/capi_linux_mips64le.go b/vendor/modernc.org/libc/netinet/in/capi_linux_mips64le.go
new file mode 100644
index 000000000..953ed0943
--- /dev/null
+++ b/vendor/modernc.org/libc/netinet/in/capi_linux_mips64le.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_linux_amd64.go -pkgname in', DO NOT EDIT.
+
+package in
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go b/vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go
new file mode 100644
index 000000000..3476f8285
--- /dev/null
+++ b/vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go
@@ -0,0 +1,4038 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ IMPLINK_HIGHEXPER = 158 // in.h:284:1:
+ IMPLINK_IP = 155 // in.h:282:1:
+ IMPLINK_LOWEXPER = 156 // in.h:283:1:
+ INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1:
+ INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1:
+ INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1:
+ INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1:
+ INADDR_ANY = 0x00000000 // in.h:366:1:
+ INADDR_BROADCAST = 0xffffffff // in.h:368:1:
+ INADDR_LOOPBACK = 0x7F000001 // in.h:367:1:
+ INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1:
+ INADDR_NONE = 0xffffffff // in.h:369:1:
+ INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1:
+ INET6_ADDRSTRLEN = 46 // in.h:1212:1:
+ INET_ADDRSTRLEN = 16 // in.h:1210:1:
+ IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1:
+ IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1:
+ IN_CLASSA_HOST = 0x00ffffff // in.h:332:1:
+ IN_CLASSA_MAX = 128 // in.h:333:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:330:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:331:1:
+ IN_CLASSB_HOST = 0x0000ffff // in.h:338:1:
+ IN_CLASSB_MAX = 65536 // in.h:339:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:336:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:337:1:
+ IN_CLASSC_HOST = 0x000000ff // in.h:344:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:342:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:343:1:
+ IN_CLASSD_HOST = 0x0fffffff // in.h:349:1:
+ IN_CLASSD_NET = 0xf0000000 // in.h:347:1:
+ IN_CLASSD_NSHIFT = 28 // in.h:348:1:
+ IN_CLASSE_NET = 0xffffffff // in.h:352:1:
+ IN_LOOPBACKNET = 127 // in.h:395:1:
+ IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1:
+ IN_PRIVATE12_NET = 0xac100000 // in.h:382:1:
+ IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1:
+ IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1:
+ IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1:
+ IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1:
+ IPPORT_BIFFUDP = 512 // in.h:250:1:
+ IPPORT_BOOTPC = 68 // in.h:214:1:
+ IPPORT_BOOTPS = 67 // in.h:213:1:
+ IPPORT_CHARGEN = 19 // in.h:199:1:
+ IPPORT_CMDSERVER = 514 // in.h:243:1:
+ IPPORT_DAYTIME = 13 // in.h:197:1:
+ IPPORT_DHCPV6C = 546 // in.h:260:1:
+ IPPORT_DHCPV6S = 547 // in.h:261:1:
+ IPPORT_DISCARD = 9 // in.h:195:1:
+ IPPORT_DOMAIN = 53 // in.h:206:1:
+ IPPORT_ECHO = 7 // in.h:194:1:
+ IPPORT_EFSSERVER = 520 // in.h:245:1:
+ IPPORT_EXECSERVER = 512 // in.h:241:1:
+ IPPORT_FINGER = 79 // in.h:217:1:
+ IPPORT_FTP = 21 // in.h:200:1:
+ IPPORT_HTTP = 80 // in.h:218:1:
+ IPPORT_HTTP_ALT = 8080 // in.h:219:1:
+ IPPORT_IKE = 500 // in.h:235:1:
+ IPPORT_IKE_NATT = 4500 // in.h:236:1:
+ IPPORT_LDAP = 389 // in.h:226:1:
+ IPPORT_LOGINSERVER = 513 // in.h:242:1:
+ IPPORT_MDNS = 5353 // in.h:207:1:
+ IPPORT_MIP = 434 // in.h:228:1:
+ IPPORT_MTP = 57 // in.h:208:1:
+ IPPORT_NAMESERVER = 42 // in.h:204:1:
+ IPPORT_NETBIOS_DGM = 138 // in.h:224:1:
+ IPPORT_NETBIOS_NS = 137 // in.h:223:1:
+ IPPORT_NETBIOS_SSN = 139 // in.h:225:1:
+ IPPORT_NETSTAT = 15 // in.h:198:1:
+ IPPORT_NTP = 123 // in.h:222:1:
+ IPPORT_PRINTER = 515 // in.h:244:1:
+ IPPORT_RESERVED = 1024 // in.h:271:1:
+ IPPORT_RIPNG = 521 // in.h:255:1:
+ IPPORT_RJE = 77 // in.h:216:1:
+ IPPORT_ROUTESERVER = 520 // in.h:254:1:
+ IPPORT_SLP = 427 // in.h:227:1:
+ IPPORT_SMB = 445 // in.h:229:1:
+ IPPORT_SMTP = 25 // in.h:202:1:
+ IPPORT_SOCKS = 1080 // in.h:263:1:
+ IPPORT_SUPDUP = 95 // in.h:221:1:
+ IPPORT_SYSLOG = 514 // in.h:252:1:
+ IPPORT_SYSTAT = 11 // in.h:196:1:
+ IPPORT_TALK = 517 // in.h:253:1:
+ IPPORT_TELNET = 23 // in.h:201:1:
+ IPPORT_TFTP = 69 // in.h:215:1:
+ IPPORT_TIMESERVER = 37 // in.h:203:1:
+ IPPORT_TTYLINK = 87 // in.h:220:1:
+ IPPORT_USERRESERVED = 5000 // in.h:272:1:
+ IPPORT_VXLAN = 4789 // in.h:230:1:
+ IPPORT_WHOIS = 43 // in.h:205:1:
+ IPPORT_WHOSERVER = 513 // in.h:251:1:
+ IPPROTO_AH = 51 // in.h:169:1:
+ IPPROTO_DSTOPTS = 60 // in.h:172:1:
+ IPPROTO_EGP = 8 // in.h:160:1:
+ IPPROTO_ENCAP = 4 // in.h:158:1:
+ IPPROTO_EON = 80 // in.h:175:1:
+ IPPROTO_ESP = 50 // in.h:168:1:
+ IPPROTO_FRAGMENT = 44 // in.h:166:1:
+ IPPROTO_GGP = 3 // in.h:157:1:
+ IPPROTO_HELLO = 63 // in.h:173:1:
+ IPPROTO_HOPOPTS = 0 // in.h:154:1:
+ IPPROTO_ICMP = 1 // in.h:155:1:
+ IPPROTO_ICMPV6 = 58 // in.h:170:1:
+ IPPROTO_IDP = 22 // in.h:163:1:
+ IPPROTO_IGMP = 2 // in.h:156:1:
+ IPPROTO_IP = 0 // in.h:153:1:
+ IPPROTO_IPV6 = 41 // in.h:164:1:
+ IPPROTO_MAX = 256 // in.h:182:1:
+ IPPROTO_ND = 77 // in.h:174:1:
+ IPPROTO_NONE = 59 // in.h:171:1:
+ IPPROTO_OSPF = 89 // in.h:176:1:
+ IPPROTO_PIM = 103 // in.h:177:1:
+ IPPROTO_PUP = 12 // in.h:161:1:
+ IPPROTO_RAW = 255 // in.h:181:1:
+ IPPROTO_ROUTING = 43 // in.h:165:1:
+ IPPROTO_RSVP = 46 // in.h:167:1:
+ IPPROTO_SCTP = 132 // in.h:178:1:
+ IPPROTO_TCP = 6 // in.h:159:1:
+ IPPROTO_UDP = 17 // in.h:162:1:
+ IPSEC_PREF_NEVER = 0x01 // in.h:941:1:
+ IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1:
+ IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1:
+ IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1:
+ IPV6_BOUND_IF = 0x41 // in.h:1307:1:
+ IPV6_CHECKSUM = 0x18 // in.h:1257:1:
+ IPV6_DONTFRAG = 0x21 // in.h:1260:1:
+ IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1:
+ IPV6_DSTOPTS = 0xf // in.h:1234:1:
+ IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1:
+ IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1:
+ IPV6_HOPLIMIT = 0xc // in.h:1231:1:
+ IPV6_HOPOPTS = 0xe // in.h:1233:1:
+ IPV6_JOIN_GROUP = 0x9 // in.h:1202:1:
+ IPV6_LEAVE_GROUP = 0xa // in.h:1204:1:
+ IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1:
+ IPV6_MULTICAST_IF = 0x6 // in.h:1193:1:
+ IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1:
+ IPV6_NEXTHOP = 0xd // in.h:1232:1:
+ IPV6_PAD1_OPT = 0 // in.h:1314:1:
+ IPV6_PATHMTU = 0x25 // in.h:1264:1:
+ IPV6_PKTINFO = 0xb // in.h:1229:1:
+ IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1:
+ IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1:
+ IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1:
+ IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1:
+ IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1:
+ IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1:
+ IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1:
+ IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1:
+ IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1:
+ IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1:
+ IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1:
+ IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1:
+ IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1:
+ IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1:
+ IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1:
+ IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1:
+ IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1:
+ IPV6_RECVPATHMTU = 0x24 // in.h:1263:1:
+ IPV6_RECVPKTINFO = 0x12 // in.h:1239:1:
+ IPV6_RECVRTHDR = 0x16 // in.h:1249:1:
+ IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1:
+ IPV6_RECVTCLASS = 0x19 // in.h:1258:1:
+ IPV6_RTHDR = 0x10 // in.h:1236:1:
+ IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1:
+ IPV6_SEC_OPT = 0x22 // in.h:1261:1:
+ IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1:
+ IPV6_TCLASS = 0x26 // in.h:1265:1:
+ IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1:
+ IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1:
+ IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1:
+ IPV6_V6ONLY = 0x27 // in.h:1266:1:
+ IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1:
+ IP_BLOCK_SOURCE = 0x15 // in.h:923:1:
+ IP_BOUND_IF = 0x41 // in.h:976:1:
+ IP_BROADCAST = 0x106 // in.h:994:1:
+ IP_BROADCAST_TTL = 0x43 // in.h:978:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1:
+ IP_DHCPINIT_IF = 0x45 // in.h:980:1:
+ IP_DONTFRAG = 0x1b // in.h:934:1:
+ IP_DONTROUTE = 0x105 // in.h:990:1:
+ IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1:
+ IP_HDRINCL = 2 // in.h:899:1:
+ IP_MULTICAST_IF = 0x10 // in.h:918:1:
+ IP_MULTICAST_LOOP = 0x12 // in.h:920:1:
+ IP_MULTICAST_TTL = 0x11 // in.h:919:1:
+ IP_NEXTHOP = 0x19 // in.h:927:1:
+ IP_OPTIONS = 1 // in.h:896:1:
+ IP_PKTINFO = 0x1a // in.h:932:1:
+ IP_RECVDSTADDR = 0x7 // in.h:911:1:
+ IP_RECVIF = 0x9 // in.h:913:1:
+ IP_RECVOPTS = 0x5 // in.h:909:1:
+ IP_RECVPKTINFO = 0x1a // in.h:933:1:
+ IP_RECVRETOPTS = 0x6 // in.h:910:1:
+ IP_RECVSLLA = 0xa // in.h:914:1:
+ IP_RECVTOS = 0xc // in.h:916:1:
+ IP_RECVTTL = 0xb // in.h:915:1:
+ IP_RETOPTS = 0x8 // in.h:912:1:
+ IP_REUSEADDR = 0x104 // in.h:986:1:
+ IP_SEC_OPT = 0x22 // in.h:940:1:
+ IP_TOS = 3 // in.h:902:1:
+ IP_TTL = 4 // in.h:906:1:
+ IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1:
+ IP_UNSPEC_SRC = 0x42 // in.h:977:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1:
+ LINUX_SLL_HOST = 0 // socket_impl.h:121:1:
+ LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1:
+ LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1:
+ LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1:
+ MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1:
+ MCAST_EXCLUDE = 2 // in.h:1122:1:
+ MCAST_INCLUDE = 1 // in.h:1121:1:
+ MCAST_JOIN_GROUP = 0x29 // in.h:1276:1:
+ MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1:
+ MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1:
+ MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1:
+ MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ PROTO_SDP = 257 // in.h:185:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IN_ADDR_T = 0 // byteorder.h:78:1:
+ X_IN_PORT_T = 0 // byteorder.h:73:1:
+ X_IPADDR_T = 0 // in.h:98:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NETINET_IN_H = 0 // in.h:33:1:
+ X_NET_IF_DL_H = 0 // if_dl.h:39:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SA_FAMILY_T = 0 // socket_impl.h:42:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOCKLEN_T = 0 // in.h:48:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_SS_MAXSIZE = 256 // socket_impl.h:70:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UN_H = 0 // un.h:39:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2015, Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+// Copyright (c) 1982, 1986 Regents of the University of California.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms are permitted
+// provided that this notice is preserved and that due credit is given
+// to the University of California at Berkeley. The name of the University
+// may not be used to endorse or promote products derived from this
+// software without specific prior written permission. This software
+// is provided ``as is'' without express or implied warranty.
+
+// Constants and structures defined by the internet system,
+// according to following documents
+//
+// Internet ASSIGNED NUMBERS (RFC1700) and its successors:
+// http://www.iana.org/assignments/protocol-numbers
+// http://www.iana.org/assignments/port-numbers
+// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
+//
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2015, Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+// Copyright (c) 1982, 1986 Regents of the University of California.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms are permitted
+// provided that this notice is preserved and that due credit is given
+// to the University of California at Berkeley. The name of the University
+// may not be used to endorse or promote products derived from this
+// software without specific prior written permission. This software
+// is provided ``as is'' without express or implied warranty.
+
+// Constants and structures defined by the internet system,
+// according to following documents
+//
+// Internet ASSIGNED NUMBERS (RFC1700) and its successors:
+// http://www.iana.org/assignments/protocol-numbers
+// http://www.iana.org/assignments/port-numbers
+// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
+//
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Portions of this source code were derived from Berkeley 4.3 BSD
+// under license from the Regents of the University of California.
+
+type Sa_family_t = uint16 /* socket_impl.h:43:18 */
+
+// Structure used by kernel to store most
+// addresses.
+type Sockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]int8
+} /* socket_impl.h:50:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Definitions for UNIX IPC domain.
+type Sockaddr_un = struct {
+ Fsun_family uint16
+ Fsun_path [108]int8
+} /* un.h:53:1 */
+
+// Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// 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 UCB 8.1 (Berkeley) 6/10/93
+
+// A Link-Level Sockaddr may specify the interface in one of two
+// ways: either by means of a system-provided index number (computed
+// anew and possibly differently on every reboot), or by a human-readable
+// string such as "il0" (for managerial convenience).
+//
+// Census taking actions, such as something akin to SIOCGCONF would return
+// both the index and the human name.
+//
+// High volume transactions (such as giving a link-level ``from'' address
+// in a recvfrom or recvmsg call) may be likely only to provide the indexed
+// form, (which requires fewer copy operations and less space).
+//
+// The form and interpretation of the link-level address is purely a matter
+// of convention between the device driver and its consumers; however, it is
+// expected that all drivers for an interface of a given if_type will agree.
+
+// Structure of a Link-Level sockaddr:
+type Sockaddr_dl = struct {
+ Fsdl_family uint16
+ Fsdl_index uint16
+ Fsdl_type uint8
+ Fsdl_nlen uint8
+ Fsdl_alen uint8
+ Fsdl_slen uint8
+ Fsdl_data [244]int8
+} /* if_dl.h:68:1 */
+
+// sockaddr_storage:
+// Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
+// structures. Has sufficient size and alignment for those sockaddrs.
+
+// Desired maximum size, alignment size and related types.
+
+// To represent desired sockaddr max alignment for platform, a
+// type is chosen which may depend on implementation platform architecture.
+// Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
+// We desire to force up to (but no more than) 64-bit (8 byte) alignment,
+// on platforms where it is possible to do so. (e.g not possible on ia32).
+// For all currently supported platforms by our implementation
+// in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
+// type "double" is suitable for that intent.
+//
+// Note: Type "double" is chosen over the more obvious integer type int64_t.
+//
+// int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
+type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */
+
+// Definitions used for sockaddr_storage structure paddings design.
+
+type Sockaddr_storage = struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+} /* socket_impl.h:96:1 */
+
+// To be compatible with the Linux interfaces used, this structure is
+// placed in socket_impl.h so that an include for <sys/socket.h> will
+// pickup this structure. This structure is for use with PF_PACKET
+// sockets.
+type Sockaddr_ll = struct {
+ Fsll_family uint16
+ Fsll_protocol uint16
+ Fsll_ifindex int32
+ Fsll_hatype uint16
+ Fsll_pkttype uint8
+ Fsll_halen uint8
+ Fsll_addr [8]uint8
+} /* socket_impl.h:111:1 */
+
+// The socklen definitions are reproduced here from sys/socket.h so as to
+// not introduce that namespace into existing users of netinet/in.h.
+type Socklen_t = uint32 /* in.h:57:18 */
+
+type Psocklen_t = uintptr /* in.h:63:15 */
+
+// Symbols such as htonl() are required to be exposed through this file,
+// per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// macros for conversion between host and (internet) network byte order
+
+type In_port_t = uint16 /* byteorder.h:74:18 */
+
+type In_addr_t = uint32 /* byteorder.h:79:18 */
+
+// Macros to reverse byte order
+
+// Macros to convert from a specific byte order to/from native byte order
+
+// Macros to read unaligned values from a specific byte order to
+// native byte order
+
+// Macros to write unaligned values from native byte order to a specific byte
+// order.
+
+// Note: IPv4 address data structures usage conventions.
+// The "in_addr_t" type below (required by Unix standards)
+// is NOT a typedef of "struct in_addr" and violates the usual
+// conventions where "struct <name>" and <name>_t are corresponding
+// typedefs.
+// To minimize confusion, kernel data structures/usage prefers use
+// of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
+// The user level APIs continue to follow the historic popular
+// practice of using "struct in_addr".
+
+type Ipaddr_t = uint32 /* in.h:99:18 */
+
+type In6_addr = struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+} /* in.h:104:1 */
+
+type In6_addr_t = In6_addr /* in.h:137:25 */
+
+// Protocols
+//
+// Some of these constant names are copied for the DTrace IP provider in
+// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
+// in sync.
+// Transmission Protocol
+
+// Port/socket numbers: network standard functions
+//
+// Entries should exist here for each port number compiled into an ON
+// component, such as snoop.
+
+// Port/socket numbers: host specific functions
+
+// Internet Key Exchange (IKE) ports
+
+// UNIX TCP sockets
+
+// UNIX UDP sockets
+
+// DHCPv6 UDP ports
+
+// Ports < IPPORT_RESERVED are reserved for
+// privileged processes (e.g. root).
+// Ports > IPPORT_USERRESERVED are reserved
+// for servers, not necessarily privileged.
+
+// Link numbers
+
+// IPv4 Internet address
+// This definition contains obsolete fields for compatibility
+// with SunOS 3.x and 4.2bsd. The presence of subnets renders
+// divisions into fixed fields misleading at best. New code
+// should use only the s_addr field.
+
+type In_addr = struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+} /* in.h:301: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.
+//
+// Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
+// IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
+// obsolete". IN_MULTICAST macro should be used to test if a address
+// is a multicast address.
+
+// We have removed CLASS E checks from the kernel
+// But we preserve these defines for userland in order
+// to avoid compile breakage of some 3rd party piece of software
+
+// Scoped IPv4 prefixes (in host byte-order)
+
+// RFC 3927 IPv4 link local address (i in host byte-order)
+
+// Well known 6to4 Relay Router Anycast address defined in RFC 3068
+
+// Define a macro to stuff the loopback address into an Internet address
+
+// IPv4 Socket address.
+type Sockaddr_in = struct {
+ Fsin_family uint16
+ Fsin_port uint16
+ Fsin_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fsin_zero [8]int8
+} /* in.h:409:1 */
+
+// IPv6 socket address.
+type Sockaddr_in6 = struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+} /* in.h:424:1 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req = struct {
+ Fipsr_ah_req uint32
+ Fipsr_esp_req uint32
+ Fipsr_self_encap_req uint32
+ Fipsr_auth_alg uint8
+ Fipsr_esp_alg uint8
+ Fipsr_esp_auth_alg uint8
+ F__ccgo_pad1 [1]byte
+} /* in.h:950:9 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req_t = Ipsec_req /* in.h:957:3 */
+
+// MCAST_* options are protocol-independent. The actual definitions
+// are with the v6 options below; this comment is here to note the
+// namespace usage.
+//
+// #define MCAST_JOIN_GROUP 0x29
+// #define MCAST_LEAVE_GROUP 0x2a
+// #define MCAST_BLOCK_SOURCE 0x2b
+// #define MCAST_UNBLOCK_SOURCE 0x2c
+// #define MCAST_JOIN_SOURCE_GROUP 0x2d
+// #define MCAST_LEAVE_SOURCE_GROUP 0x2e
+
+// SunOS private (potentially not portable) IP_ option names
+// can be reused 0x44
+
+// Option values and names (when !_XPG5) shared with <xti_inet.h>
+
+// The following option values are reserved by <xti_inet.h>
+//
+// T_IP_OPTIONS 0x107 - IP per-packet options
+// T_IP_TOS 0x108 - IP per packet type of service
+
+// Default value constants for multicast attributes controlled by
+// IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
+
+// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
+type Ip_mreq = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1015:1 */
+
+// Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
+// IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
+type Ip_mreq_source = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_sourceaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1024:1 */
+
+// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
+// IPv6 addresses.
+type Ipv6_mreq = struct {
+ Fipv6mr_multiaddr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipv6mr_interface uint32
+} /* in.h:1034:1 */
+
+// Use #pragma pack() construct to force 32-bit alignment on amd64.
+// This is needed to keep the structure size and offsets consistent
+// between a 32-bit app and the 64-bit amd64 kernel in structures
+// where 64-bit alignment would create gaps (in this case, structures
+// which have a uint32_t followed by a struct sockaddr_storage).
+
+// Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
+type Group_req = struct {
+ Fgr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1053:1 */
+
+// Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
+// MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
+type Group_source_req = struct {
+ Fgsr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgsr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgsr_source struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1062:1 */
+
+// Argument for SIOC[GS]MSFILTER ioctls
+type Group_filter = struct {
+ Fgf_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgf_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgf_fmode uint32
+ Fgf_numsrc uint32
+ Fgf_slist [1]struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1071:1 */
+
+// Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
+type Ip_msfilter = struct {
+ Fimsf_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_fmode uint32
+ Fimsf_numsrc uint32
+ Fimsf_slist [1]struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1090:1 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo = struct {
+ Fipi_ifindex uint32
+ Fipi_spec_dst struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fipi_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1127:9 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */
+
+// Argument struct for IPV6_PKTINFO option
+type In6_pktinfo = struct {
+ Fipi6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipi6_ifindex uint32
+} /* in.h:1136:1 */
+
+// Argument struct for IPV6_MTUINFO option
+type Ip6_mtuinfo = struct {
+ Fip6m_addr struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+ }
+ Fip6m_mtu uint32
+} /* in.h:1144:1 */
+
+// Argument structure for IP_ADD_PROXY_ADDR.
+// Note that this is an unstable, experimental interface. It may change
+// later. Don't use it unless you know what it is.
+type In_prefix_t = struct {
+ Fin_prefix_addr In_addr
+ Fin_prefix_len uint32
+} /* in.h:1183:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go b/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go
index cfd5e88aa..d91dbd360 100644
--- a/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go
+++ b/vendor/modernc.org/libc/netinet/in/in_linux_loong64.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 -ignore-unsupported-alignment -o netinet/in/in_linux_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_linux_loong64.go -pkgname in', DO NOT EDIT.
package in
@@ -15,516 +15,443 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- AF_ALG = 38 // socket.h:133:1:
- AF_APPLETALK = 5 // socket.h:99:1:
- AF_ASH = 18 // socket.h:113:1:
- AF_ATMPVC = 8 // socket.h:102:1:
- AF_ATMSVC = 20 // socket.h:115:1:
- AF_AX25 = 3 // socket.h:97:1:
- AF_BLUETOOTH = 31 // socket.h:126:1:
- AF_BRIDGE = 7 // socket.h:101:1:
- AF_CAIF = 37 // socket.h:132:1:
- AF_CAN = 29 // socket.h:124:1:
- AF_DECnet = 12 // socket.h:106:1:
- AF_ECONET = 19 // socket.h:114:1:
- AF_FILE = 1 // socket.h:95:1:
- AF_IB = 27 // socket.h:122:1:
- AF_IEEE802154 = 36 // socket.h:131:1:
- AF_INET = 2 // socket.h:96:1:
- AF_INET6 = 10 // socket.h:104:1:
- AF_IPX = 4 // socket.h:98:1:
- AF_IRDA = 23 // socket.h:118:1:
- AF_ISDN = 34 // socket.h:129:1:
- AF_IUCV = 32 // socket.h:127:1:
- AF_KCM = 41 // socket.h:136:1:
- AF_KEY = 15 // socket.h:109:1:
- AF_LLC = 26 // socket.h:121:1:
- AF_LOCAL = 1 // socket.h:93:1:
- AF_MAX = 45 // socket.h:140:1:
- AF_MPLS = 28 // socket.h:123:1:
- AF_NETBEUI = 13 // socket.h:107:1:
- AF_NETLINK = 16 // socket.h:110:1:
- AF_NETROM = 6 // socket.h:100:1:
- AF_NFC = 39 // socket.h:134:1:
- AF_PACKET = 17 // socket.h:112:1:
- AF_PHONET = 35 // socket.h:130:1:
- AF_PPPOX = 24 // socket.h:119:1:
- AF_QIPCRTR = 42 // socket.h:137:1:
- AF_RDS = 21 // socket.h:116:1:
- AF_ROSE = 11 // socket.h:105:1:
- AF_ROUTE = 16 // socket.h:111:1:
- AF_RXRPC = 33 // socket.h:128:1:
- AF_SECURITY = 14 // socket.h:108:1:
- AF_SMC = 43 // socket.h:138:1:
- AF_SNA = 22 // socket.h:117:1:
- AF_TIPC = 30 // socket.h:125:1:
- AF_UNIX = 1 // socket.h:94:1:
- AF_UNSPEC = 0 // socket.h:92:1:
- AF_VSOCK = 40 // socket.h:135:1:
- AF_WANPIPE = 25 // socket.h:120:1:
- AF_X25 = 9 // socket.h:103:1:
- AF_XDP = 44 // socket.h:139:1:
- BIG_ENDIAN = 4321 // endian.h:28:1:
- BYTE_ORDER = 1234 // endian.h:30:1:
- FD_SETSIZE = 1024 // select.h:73:1:
- FIOGETOWN = 0x8903 // sockios.h:8:1:
- FIOSETOWN = 0x8901 // sockios.h:6:1:
- INET6_ADDRSTRLEN = 46 // in.h:234:1:
- INET_ADDRSTRLEN = 16 // in.h:233:1:
- IN_CLASSA_HOST = 16777215 // in.h:169:1:
- IN_CLASSA_MAX = 128 // in.h:170:1:
- IN_CLASSA_NET = 0xff000000 // in.h:167:1:
- IN_CLASSA_NSHIFT = 24 // in.h:168:1:
- IN_CLASSB_HOST = 65535 // in.h:175:1:
- IN_CLASSB_MAX = 65536 // in.h:176:1:
- IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
- IN_CLASSB_NSHIFT = 16 // in.h:174:1:
- IN_CLASSC_HOST = 255 // in.h:181:1:
- IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
- IN_CLASSC_NSHIFT = 8 // in.h:180:1:
- IN_LOOPBACKNET = 127 // in.h:197:1:
- IPV6_2292DSTOPTS = 4 // in.h:171:1:
- IPV6_2292HOPLIMIT = 8 // in.h:175:1:
- IPV6_2292HOPOPTS = 3 // in.h:170:1:
- IPV6_2292PKTINFO = 2 // in.h:169:1:
- IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
- IPV6_2292RTHDR = 5 // in.h:172:1:
- IPV6_ADDRFORM = 1 // in.h:168:1:
- IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
- IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
- IPV6_AUTHHDR = 10 // in.h:180:1:
- IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
- IPV6_CHECKSUM = 7 // in.h:174:1:
- IPV6_DONTFRAG = 62 // in.h:214:1:
- IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
- IPV6_DSTOPTS = 59 // in.h:211:1:
- IPV6_FREEBIND = 78 // in.h:233:1:
- IPV6_HDRINCL = 36 // in.h:198:1:
- IPV6_HOPLIMIT = 52 // in.h:204:1:
- IPV6_HOPOPTS = 54 // in.h:206:1:
- IPV6_IPSEC_POLICY = 34 // in.h:196:1:
- IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
- IPV6_JOIN_GROUP = 20 // in.h:185:1:
- IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
- IPV6_LEAVE_GROUP = 21 // in.h:186:1:
- IPV6_MINHOPCOUNT = 73 // in.h:226:1:
- IPV6_MTU = 24 // in.h:189:1:
- IPV6_MTU_DISCOVER = 23 // in.h:188:1:
- IPV6_MULTICAST_ALL = 29 // in.h:194:1:
- IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
- IPV6_MULTICAST_IF = 17 // in.h:182:1:
- IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
- IPV6_NEXTHOP = 9 // in.h:179:1:
- IPV6_ORIGDSTADDR = 74 // in.h:228:1:
- IPV6_PATHMTU = 61 // in.h:213:1:
- IPV6_PKTINFO = 50 // in.h:202:1:
- IPV6_PMTUDISC_DO = 2 // in.h:246:1:
- IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
- IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
- IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
- IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
- IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
- IPV6_RECVDSTOPTS = 58 // in.h:210:1:
- IPV6_RECVERR = 25 // in.h:190:1:
- IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
- IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
- IPV6_RECVHOPOPTS = 53 // in.h:205:1:
- IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
- IPV6_RECVPATHMTU = 60 // in.h:212:1:
- IPV6_RECVPKTINFO = 49 // in.h:201:1:
- IPV6_RECVRTHDR = 56 // in.h:208:1:
- IPV6_RECVTCLASS = 66 // in.h:217:1:
- IPV6_ROUTER_ALERT = 22 // in.h:187:1:
- IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
- IPV6_RTHDR = 57 // in.h:209:1:
- IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
- IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
- IPV6_RTHDR_STRICT = 1 // in.h:257:1:
- IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
- IPV6_RXDSTOPTS = 59 // in.h:241:1:
- IPV6_RXHOPOPTS = 54 // in.h:240:1:
- IPV6_TCLASS = 67 // in.h:218:1:
- IPV6_TRANSPARENT = 75 // in.h:230:1:
- IPV6_UNICAST_HOPS = 16 // in.h:181:1:
- IPV6_UNICAST_IF = 76 // in.h:231:1:
- IPV6_V6ONLY = 26 // in.h:191:1:
- IPV6_XFRM_POLICY = 35 // in.h:197:1:
- IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
- IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
- IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
- IP_BLOCK_SOURCE = 38 // in.h:124:1:
- IP_CHECKSUM = 23 // in.h:102:1:
- IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
- IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
- IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
- IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
- IP_FREEBIND = 15 // in.h:89:1:
- IP_HDRINCL = 3 // in.h:48:1:
- IP_IPSEC_POLICY = 16 // in.h:90:1:
- IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
- IP_MINTTL = 21 // in.h:100:1:
- IP_MSFILTER = 41 // in.h:127:1:
- IP_MTU = 14 // in.h:88:1:
- IP_MTU_DISCOVER = 10 // in.h:84:1:
- IP_MULTICAST_ALL = 49 // in.h:128:1:
- IP_MULTICAST_IF = 32 // in.h:118:1:
- IP_MULTICAST_LOOP = 34 // in.h:120:1:
- IP_MULTICAST_TTL = 33 // in.h:119:1:
- IP_NODEFRAG = 22 // in.h:101:1:
- IP_OPTIONS = 4 // in.h:47:1:
- IP_ORIGDSTADDR = 20 // in.h:97:1:
- IP_PASSSEC = 18 // in.h:92:1:
- IP_PKTINFO = 8 // in.h:81:1:
- IP_PKTOPTIONS = 9 // in.h:82:1:
- IP_PMTUDISC = 10 // in.h:83:1:
- IP_PMTUDISC_DO = 2 // in.h:109:1:
- IP_PMTUDISC_DONT = 0 // in.h:107:1:
- IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
- IP_PMTUDISC_OMIT = 5 // in.h:116:1:
- IP_PMTUDISC_PROBE = 3 // in.h:110:1:
- IP_PMTUDISC_WANT = 1 // in.h:108:1:
- IP_RECVERR = 11 // in.h:85:1:
- IP_RECVFRAGSIZE = 25 // in.h:104:1:
- IP_RECVOPTS = 6 // in.h:51:1:
- IP_RECVORIGDSTADDR = 20 // in.h:98:1:
- IP_RECVRETOPTS = 7 // in.h:53:1:
- IP_RECVTOS = 13 // in.h:87:1:
- IP_RECVTTL = 12 // in.h:86:1:
- IP_RETOPTS = 7 // in.h:54:1:
- IP_ROUTER_ALERT = 5 // in.h:80:1:
- IP_TOS = 1 // in.h:49:1:
- IP_TRANSPARENT = 19 // in.h:93:1:
- IP_TTL = 2 // in.h:50:1:
- IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
- IP_UNICAST_IF = 50 // in.h:129:1:
- IP_XFRM_POLICY = 17 // in.h:91:1:
- LITTLE_ENDIAN = 1234 // endian.h:27:1:
- MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
- MCAST_EXCLUDE = 0 // in.h:76:1:
- MCAST_INCLUDE = 1 // in.h:77:1:
- MCAST_JOIN_GROUP = 42 // in.h:66:1:
- MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
- MCAST_LEAVE_GROUP = 45 // in.h:69:1:
- MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
- MCAST_MSFILTER = 48 // in.h:72:1:
- MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
- PDP_ENDIAN = 3412 // endian.h:29:1:
- PF_ALG = 38 // socket.h:82:1:
- PF_APPLETALK = 5 // socket.h:48:1:
- PF_ASH = 18 // socket.h:62:1:
- PF_ATMPVC = 8 // socket.h:51:1:
- PF_ATMSVC = 20 // socket.h:64:1:
- PF_AX25 = 3 // socket.h:46:1:
- PF_BLUETOOTH = 31 // socket.h:75:1:
- PF_BRIDGE = 7 // socket.h:50:1:
- PF_CAIF = 37 // socket.h:81:1:
- PF_CAN = 29 // socket.h:73:1:
- PF_DECnet = 12 // socket.h:55:1:
- PF_ECONET = 19 // socket.h:63:1:
- PF_FILE = 1 // socket.h:44:1:
- PF_IB = 27 // socket.h:71:1:
- PF_IEEE802154 = 36 // socket.h:80:1:
- PF_INET = 2 // socket.h:45:1:
- PF_INET6 = 10 // socket.h:53:1:
- PF_IPX = 4 // socket.h:47:1:
- PF_IRDA = 23 // socket.h:67:1:
- PF_ISDN = 34 // socket.h:78:1:
- PF_IUCV = 32 // socket.h:76:1:
- PF_KCM = 41 // socket.h:85:1:
- PF_KEY = 15 // socket.h:58:1:
- PF_LLC = 26 // socket.h:70:1:
- PF_LOCAL = 1 // socket.h:42:1:
- PF_MAX = 45 // socket.h:89:1:
- PF_MPLS = 28 // socket.h:72:1:
- PF_NETBEUI = 13 // socket.h:56:1:
- PF_NETLINK = 16 // socket.h:59:1:
- PF_NETROM = 6 // socket.h:49:1:
- PF_NFC = 39 // socket.h:83:1:
- PF_PACKET = 17 // socket.h:61:1:
- PF_PHONET = 35 // socket.h:79:1:
- PF_PPPOX = 24 // socket.h:68:1:
- PF_QIPCRTR = 42 // socket.h:86:1:
- PF_RDS = 21 // socket.h:65:1:
- PF_ROSE = 11 // socket.h:54:1:
- PF_ROUTE = 16 // socket.h:60:1:
- PF_RXRPC = 33 // socket.h:77:1:
- PF_SECURITY = 14 // socket.h:57:1:
- PF_SMC = 43 // socket.h:87:1:
- PF_SNA = 22 // socket.h:66:1:
- PF_TIPC = 30 // socket.h:74:1:
- PF_UNIX = 1 // socket.h:43:1:
- PF_UNSPEC = 0 // socket.h:41:1:
- PF_VSOCK = 40 // socket.h:84:1:
- PF_WANPIPE = 25 // socket.h:69:1:
- PF_X25 = 9 // socket.h:52:1:
- PF_XDP = 44 // socket.h:88:1:
- SCM_TIMESTAMP = 29 // socket.h:140:1:
- SCM_TIMESTAMPING = 37 // socket.h:142:1:
- SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
- SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
- SCM_TIMESTAMPNS = 35 // socket.h:141:1:
- SCM_TXTIME = 61 // socket.h:105:1:
- SCM_WIFI_STATUS = 41 // socket.h:64:1:
- SIOCATMARK = 0x8905 // sockios.h:10:1:
- SIOCGPGRP = 0x8904 // sockios.h:9:1:
- SIOCGSTAMP = 0x8906 // sockios.h:11:1:
- SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
- SIOCSPGRP = 0x8902 // sockios.h:7:1:
- SOL_AAL = 265 // socket.h:151:1:
- SOL_ALG = 279 // socket.h:165:1:
- SOL_ATM = 264 // socket.h:150:1:
- SOL_BLUETOOTH = 274 // socket.h:160:1:
- SOL_CAIF = 278 // socket.h:164:1:
- SOL_DCCP = 269 // socket.h:155:1:
- SOL_DECNET = 261 // socket.h:147:1:
- SOL_ICMPV6 = 58 // in.h:253:1:
- SOL_IP = 0 // in.h:132:1:
- SOL_IPV6 = 41 // in.h:252:1:
- SOL_IRDA = 266 // socket.h:152:1:
- SOL_IUCV = 277 // socket.h:163:1:
- SOL_KCM = 281 // socket.h:167:1:
- SOL_LLC = 268 // socket.h:154:1:
- SOL_NETBEUI = 267 // socket.h:153:1:
- SOL_NETLINK = 270 // socket.h:156:1:
- SOL_NFC = 280 // socket.h:166:1:
- SOL_PACKET = 263 // socket.h:149:1:
- SOL_PNPIPE = 275 // socket.h:161:1:
- SOL_PPPOL2TP = 273 // socket.h:159:1:
- SOL_RAW = 255 // socket.h:146:1:
- SOL_RDS = 276 // socket.h:162:1:
- SOL_RXRPC = 272 // socket.h:158:1:
- SOL_SOCKET = 1 // socket.h:9:1:
- SOL_TIPC = 271 // socket.h:157:1:
- SOL_TLS = 282 // socket.h:168:1:
- SOL_X25 = 262 // socket.h:148:1:
- SOL_XDP = 283 // socket.h:169:1:
- SOMAXCONN = 4096 // socket.h:172:1:
- SO_ACCEPTCONN = 30 // socket.h:51:1:
- SO_ATTACH_BPF = 50 // socket.h:82:1:
- SO_ATTACH_FILTER = 26 // socket.h:45:1:
- SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
- SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
- SO_BINDTODEVICE = 25 // socket.h:42:1:
- SO_BINDTOIFINDEX = 62 // socket.h:107:1:
- SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
- SO_BROADCAST = 6 // socket.h:16:1:
- SO_BSDCOMPAT = 14 // socket.h:26:1:
- SO_BUSY_POLL = 46 // socket.h:74:1:
- SO_CNX_ADVICE = 53 // socket.h:88:1:
- SO_COOKIE = 57 // socket.h:96:1:
- SO_DEBUG = 1 // socket.h:11:1:
- SO_DETACH_BPF = 27 // socket.h:83:1:
- SO_DETACH_FILTER = 27 // socket.h:46:1:
- SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
- SO_DOMAIN = 39 // socket.h:59:1:
- SO_DONTROUTE = 5 // socket.h:15:1:
- SO_ERROR = 4 // socket.h:14:1:
- SO_GET_FILTER = 26 // socket.h:47:1:
- SO_INCOMING_CPU = 49 // socket.h:80:1:
- SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
- SO_KEEPALIVE = 9 // socket.h:21:1:
- SO_LINGER = 13 // socket.h:25:1:
- SO_LOCK_FILTER = 44 // socket.h:70:1:
- SO_MARK = 36 // socket.h:56:1:
- SO_MAX_PACING_RATE = 47 // socket.h:76:1:
- SO_MEMINFO = 55 // socket.h:92:1:
- SO_NOFCS = 43 // socket.h:68:1:
- SO_NO_CHECK = 11 // socket.h:23:1:
- SO_OOBINLINE = 10 // socket.h:22:1:
- SO_PASSCRED = 16 // socket.h:29:1:
- SO_PASSSEC = 34 // socket.h:54:1:
- SO_PEEK_OFF = 42 // socket.h:65:1:
- SO_PEERCRED = 17 // socket.h:30:1:
- SO_PEERGROUPS = 59 // socket.h:100:1:
- SO_PEERNAME = 28 // socket.h:49:1:
- SO_PEERSEC = 31 // socket.h:53:1:
- SO_PRIORITY = 12 // socket.h:24:1:
- SO_PROTOCOL = 38 // socket.h:58:1:
- SO_RCVBUF = 8 // socket.h:18:1:
- SO_RCVBUFFORCE = 33 // socket.h:20:1:
- SO_RCVLOWAT = 18 // socket.h:31:1:
- SO_RCVTIMEO = 20 // socket.h:129:1:
- SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
- SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
- SO_REUSEADDR = 2 // socket.h:12:1:
- SO_REUSEPORT = 15 // socket.h:27:1:
- SO_RXQ_OVFL = 40 // socket.h:61:1:
- SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
- SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
- SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
- SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
- SO_SNDBUF = 7 // socket.h:17:1:
- SO_SNDBUFFORCE = 32 // socket.h:19:1:
- SO_SNDLOWAT = 19 // socket.h:32:1:
- SO_SNDTIMEO = 21 // socket.h:130:1:
- SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
- SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
- SO_TIMESTAMP = 29 // socket.h:125:1:
- SO_TIMESTAMPING = 37 // socket.h:127:1:
- SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
- SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
- SO_TIMESTAMPNS = 35 // socket.h:126:1:
- SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
- SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
- SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
- SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
- SO_TXTIME = 61 // socket.h:104:1:
- SO_TYPE = 3 // socket.h:13:1:
- SO_WIFI_STATUS = 41 // socket.h:63:1:
- SO_ZEROCOPY = 60 // socket.h:102:1:
- X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
- X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
- X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ENDIAN_H = 1 // endian.h:19:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_NETINET_IN_H = 1 // in.h:19:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_SS_SIZE = 128 // sockaddr.h:40:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_SOCKET_H = 1 // socket.h:20:1:
- X_SYS_TYPES_H = 1 // types.h:23:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
-)
-
-// Standard well-known ports.
-const ( /* in.h:122:1: */
- IPPORT_ECHO = 7 // Echo service.
- IPPORT_DISCARD = 9 // Discard transmissions service.
- IPPORT_SYSTAT = 11 // System status service.
- IPPORT_DAYTIME = 13 // Time of day service.
- IPPORT_NETSTAT = 15 // Network status service.
- IPPORT_FTP = 21 // File Transfer Protocol.
- IPPORT_TELNET = 23 // Telnet protocol.
- IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
- IPPORT_TIMESERVER = 37 // Timeserver service.
- IPPORT_NAMESERVER = 42 // Domain Name Service.
- IPPORT_WHOIS = 43 // Internet Whois service.
- IPPORT_MTP = 57
-
- IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
- IPPORT_RJE = 77
- IPPORT_FINGER = 79 // Finger service.
- IPPORT_TTYLINK = 87
- IPPORT_SUPDUP = 95 // SUPDUP protocol.
-
- IPPORT_EXECSERVER = 512 // execd service.
- IPPORT_LOGINSERVER = 513 // rlogind service.
- IPPORT_CMDSERVER = 514
- IPPORT_EFSSERVER = 520
-
- // UDP ports.
- IPPORT_BIFFUDP = 512
- IPPORT_WHOSERVER = 513
- IPPORT_ROUTESERVER = 520
-
- // Ports less than this value are reserved for privileged processes.
- IPPORT_RESERVED = 1024
-
- // Ports greater this value are reserved for (non-privileged) servers.
- IPPORT_USERRESERVED = 5000
-)
-
-// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
-// The first word in the comment at the right is the data type used;
-// "bool" means a boolean value stored in an `int'.
-
-// Advanced API (RFC3542) (1).
-
-// Advanced API (RFC3542) (2).
-
-// RFC5014.
-
-// RFC5082.
-
-// Obsolete synonyms for the above.
-
-// IPV6_MTU_DISCOVER values.
-
-// Socket level values for IPv6.
-
-// Routing header options for IPv6.
-
-// Standard well-defined IP protocols.
-const ( /* in.h:40:1: */
- IPPROTO_IP = 0 // Dummy protocol for TCP.
- IPPROTO_ICMP = 1 // Internet Control Message Protocol.
- IPPROTO_IGMP = 2 // Internet Group Management Protocol.
- IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
- IPPROTO_TCP = 6 // Transmission Control Protocol.
- IPPROTO_EGP = 8 // Exterior Gateway Protocol.
- IPPROTO_PUP = 12 // PUP protocol.
- IPPROTO_UDP = 17 // User Datagram Protocol.
- IPPROTO_IDP = 22 // XNS IDP protocol.
- IPPROTO_TP = 29 // SO Transport Protocol Class 4.
- IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
- IPPROTO_IPV6 = 41 // IPv6 header.
- IPPROTO_RSVP = 46 // Reservation Protocol.
- IPPROTO_GRE = 47 // General Routing Encapsulation.
- IPPROTO_ESP = 50 // encapsulating security payload.
- IPPROTO_AH = 51 // authentication header.
- IPPROTO_MTP = 92 // Multicast Transport Protocol.
- IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
- IPPROTO_ENCAP = 98 // Encapsulation Header.
- IPPROTO_PIM = 103 // Protocol Independent Multicast.
- IPPROTO_COMP = 108 // Compression Header Protocol.
- IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
- IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
- IPPROTO_MPLS = 137 // MPLS in IP.
- IPPROTO_RAW = 255 // Raw IP packets.
- IPPROTO_MAX = 256
-)
-
-// 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.
-const ( /* in.h:99:1: */
- IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
- IPPROTO_ROUTING = 43 // IPv6 routing header.
- IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
- IPPROTO_ICMPV6 = 58 // ICMPv6.
- IPPROTO_NONE = 59 // IPv6 no next header.
- IPPROTO_DSTOPTS = 60 // IPv6 destination options.
- IPPROTO_MH = 135
+ AF_ALG = 38 // socket.h:134:1:
+ AF_APPLETALK = 5 // socket.h:100:1:
+ AF_ASH = 18 // socket.h:114:1:
+ AF_ATMPVC = 8 // socket.h:103:1:
+ AF_ATMSVC = 20 // socket.h:116:1:
+ AF_AX25 = 3 // socket.h:98:1:
+ AF_BLUETOOTH = 31 // socket.h:127:1:
+ AF_BRIDGE = 7 // socket.h:102:1:
+ AF_CAIF = 37 // socket.h:133:1:
+ AF_CAN = 29 // socket.h:125:1:
+ AF_DECnet = 12 // socket.h:107:1:
+ AF_ECONET = 19 // socket.h:115:1:
+ AF_FILE = 1 // socket.h:96:1:
+ AF_IB = 27 // socket.h:123:1:
+ AF_IEEE802154 = 36 // socket.h:132:1:
+ AF_INET = 2 // socket.h:97:1:
+ AF_INET6 = 10 // socket.h:105:1:
+ AF_IPX = 4 // socket.h:99:1:
+ AF_IRDA = 23 // socket.h:119:1:
+ AF_ISDN = 34 // socket.h:130:1:
+ AF_IUCV = 32 // socket.h:128:1:
+ AF_KCM = 41 // socket.h:137:1:
+ AF_KEY = 15 // socket.h:110:1:
+ AF_LLC = 26 // socket.h:122:1:
+ AF_LOCAL = 1 // socket.h:94:1:
+ AF_MAX = 46 // socket.h:142:1:
+ AF_MCTP = 45 // socket.h:141:1:
+ AF_MPLS = 28 // socket.h:124:1:
+ AF_NETBEUI = 13 // socket.h:108:1:
+ AF_NETLINK = 16 // socket.h:111:1:
+ AF_NETROM = 6 // socket.h:101:1:
+ AF_NFC = 39 // socket.h:135:1:
+ AF_PACKET = 17 // socket.h:113:1:
+ AF_PHONET = 35 // socket.h:131:1:
+ AF_PPPOX = 24 // socket.h:120:1:
+ AF_QIPCRTR = 42 // socket.h:138:1:
+ AF_RDS = 21 // socket.h:117:1:
+ AF_ROSE = 11 // socket.h:106:1:
+ AF_ROUTE = 16 // socket.h:112:1:
+ AF_RXRPC = 33 // socket.h:129:1:
+ AF_SECURITY = 14 // socket.h:109:1:
+ AF_SMC = 43 // socket.h:139:1:
+ AF_SNA = 22 // socket.h:118:1:
+ AF_TIPC = 30 // socket.h:126:1:
+ AF_UNIX = 1 // socket.h:95:1:
+ AF_UNSPEC = 0 // socket.h:93:1:
+ AF_VSOCK = 40 // socket.h:136:1:
+ AF_WANPIPE = 25 // socket.h:121:1:
+ AF_X25 = 9 // socket.h:104:1:
+ AF_XDP = 44 // socket.h:140:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FIOGETOWN = 0x8903 // sockios.h:8:1:
+ FIOSETOWN = 0x8901 // sockios.h:6:1:
+ INET6_ADDRSTRLEN = 46 // in.h:243:1:
+ INET_ADDRSTRLEN = 16 // in.h:242:1:
+ IN_CLASSA_HOST = 16777215 // in.h:175:1:
+ IN_CLASSA_MAX = 128 // in.h:176:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:173:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:174:1:
+ IN_CLASSB_HOST = 65535 // in.h:181:1:
+ IN_CLASSB_MAX = 65536 // in.h:182:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:179:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:180:1:
+ IN_CLASSC_HOST = 255 // in.h:187:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:185:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:186:1:
+ IN_LOOPBACKNET = 127 // in.h:206:1:
+ IPV6_2292DSTOPTS = 4 // in.h:166:1:
+ IPV6_2292HOPLIMIT = 8 // in.h:170:1:
+ IPV6_2292HOPOPTS = 3 // in.h:165:1:
+ IPV6_2292PKTINFO = 2 // in.h:164:1:
+ IPV6_2292PKTOPTIONS = 6 // in.h:168:1:
+ IPV6_2292RTHDR = 5 // in.h:167:1:
+ IPV6_ADDRFORM = 1 // in.h:163:1:
+ IPV6_ADDR_PREFERENCES = 72 // in.h:219:1:
+ IPV6_ADD_MEMBERSHIP = 20 // in.h:233:1:
+ IPV6_AUTHHDR = 10 // in.h:175:1:
+ IPV6_AUTOFLOWLABEL = 70 // in.h:216:1:
+ IPV6_CHECKSUM = 7 // in.h:169:1:
+ IPV6_DONTFRAG = 62 // in.h:210:1:
+ IPV6_DROP_MEMBERSHIP = 21 // in.h:234:1:
+ IPV6_DSTOPTS = 59 // in.h:207:1:
+ IPV6_FREEBIND = 78 // in.h:229:1:
+ IPV6_HDRINCL = 36 // in.h:194:1:
+ IPV6_HOPLIMIT = 52 // in.h:200:1:
+ IPV6_HOPOPTS = 54 // in.h:202:1:
+ IPV6_IPSEC_POLICY = 34 // in.h:192:1:
+ IPV6_JOIN_ANYCAST = 27 // in.h:187:1:
+ IPV6_JOIN_GROUP = 20 // in.h:180:1:
+ IPV6_LEAVE_ANYCAST = 28 // in.h:188:1:
+ IPV6_LEAVE_GROUP = 21 // in.h:181:1:
+ IPV6_MINHOPCOUNT = 73 // in.h:222:1:
+ IPV6_MTU = 24 // in.h:184:1:
+ IPV6_MTU_DISCOVER = 23 // in.h:183:1:
+ IPV6_MULTICAST_ALL = 29 // in.h:189:1:
+ IPV6_MULTICAST_HOPS = 18 // in.h:178:1:
+ IPV6_MULTICAST_IF = 17 // in.h:177:1:
+ IPV6_MULTICAST_LOOP = 19 // in.h:179:1:
+ IPV6_NEXTHOP = 9 // in.h:174:1:
+ IPV6_ORIGDSTADDR = 74 // in.h:224:1:
+ IPV6_PATHMTU = 61 // in.h:209:1:
+ IPV6_PKTINFO = 50 // in.h:198:1:
+ IPV6_PMTUDISC_DO = 2 // in.h:242:1:
+ IPV6_PMTUDISC_DONT = 0 // in.h:240:1:
+ IPV6_PMTUDISC_INTERFACE = 4 // in.h:244:1:
+ IPV6_PMTUDISC_OMIT = 5 // in.h:245:1:
+ IPV6_PMTUDISC_PROBE = 3 // in.h:243:1:
+ IPV6_PMTUDISC_WANT = 1 // in.h:241:1:
+ IPV6_RECVDSTOPTS = 58 // in.h:206:1:
+ IPV6_RECVERR = 25 // in.h:185:1:
+ IPV6_RECVERR_RFC4884 = 31 // in.h:191:1:
+ IPV6_RECVFRAGSIZE = 77 // in.h:228:1:
+ IPV6_RECVHOPLIMIT = 51 // in.h:199:1:
+ IPV6_RECVHOPOPTS = 53 // in.h:201:1:
+ IPV6_RECVORIGDSTADDR = 74 // in.h:225:1:
+ IPV6_RECVPATHMTU = 60 // in.h:208:1:
+ IPV6_RECVPKTINFO = 49 // in.h:197:1:
+ IPV6_RECVRTHDR = 56 // in.h:204:1:
+ IPV6_RECVTCLASS = 66 // in.h:213:1:
+ IPV6_ROUTER_ALERT = 22 // in.h:182:1:
+ IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:190:1:
+ IPV6_RTHDR = 57 // in.h:205:1:
+ IPV6_RTHDRDSTOPTS = 55 // in.h:203:1:
+ IPV6_RTHDR_LOOSE = 0 // in.h:252:1:
+ IPV6_RTHDR_STRICT = 1 // in.h:253:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:255:1:
+ IPV6_RXDSTOPTS = 59 // in.h:237:1:
+ IPV6_RXHOPOPTS = 54 // in.h:236:1:
+ IPV6_TCLASS = 67 // in.h:214:1:
+ IPV6_TRANSPARENT = 75 // in.h:226:1:
+ IPV6_UNICAST_HOPS = 16 // in.h:176:1:
+ IPV6_UNICAST_IF = 76 // in.h:227:1:
+ IPV6_V6ONLY = 26 // in.h:186:1:
+ IPV6_XFRM_POLICY = 35 // in.h:193:1:
+ IP_ADD_MEMBERSHIP = 35 // in.h:122:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:126:1:
+ IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
+ IP_BLOCK_SOURCE = 38 // in.h:125:1:
+ IP_CHECKSUM = 23 // in.h:102:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:138:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:137:1:
+ IP_DROP_MEMBERSHIP = 36 // in.h:123:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:127:1:
+ IP_FREEBIND = 15 // in.h:89:1:
+ IP_HDRINCL = 3 // in.h:48:1:
+ IP_IPSEC_POLICY = 16 // in.h:90:1:
+ IP_LOCAL_PORT_RANGE = 51 // in.h:131:1:
+ IP_MAX_MEMBERSHIPS = 20 // in.h:139:1:
+ IP_MINTTL = 21 // in.h:100:1:
+ IP_MSFILTER = 41 // in.h:128:1:
+ IP_MTU = 14 // in.h:88:1:
+ IP_MTU_DISCOVER = 10 // in.h:84:1:
+ IP_MULTICAST_ALL = 49 // in.h:129:1:
+ IP_MULTICAST_IF = 32 // in.h:119:1:
+ IP_MULTICAST_LOOP = 34 // in.h:121:1:
+ IP_MULTICAST_TTL = 33 // in.h:120:1:
+ IP_NODEFRAG = 22 // in.h:101:1:
+ IP_OPTIONS = 4 // in.h:47:1:
+ IP_ORIGDSTADDR = 20 // in.h:97:1:
+ IP_PASSSEC = 18 // in.h:92:1:
+ IP_PKTINFO = 8 // in.h:81:1:
+ IP_PKTOPTIONS = 9 // in.h:82:1:
+ IP_PMTUDISC = 10 // in.h:83:1:
+ IP_PMTUDISC_DO = 2 // in.h:110:1:
+ IP_PMTUDISC_DONT = 0 // in.h:108:1:
+ IP_PMTUDISC_INTERFACE = 4 // in.h:115:1:
+ IP_PMTUDISC_OMIT = 5 // in.h:117:1:
+ IP_PMTUDISC_PROBE = 3 // in.h:111:1:
+ IP_PMTUDISC_WANT = 1 // in.h:109:1:
+ IP_PROTOCOL = 52 // in.h:132:1:
+ IP_RECVERR = 11 // in.h:85:1:
+ IP_RECVERR_RFC4884 = 26 // in.h:105:1:
+ IP_RECVFRAGSIZE = 25 // in.h:104:1:
+ IP_RECVOPTS = 6 // in.h:51:1:
+ IP_RECVORIGDSTADDR = 20 // in.h:98:1:
+ IP_RECVRETOPTS = 7 // in.h:53:1:
+ IP_RECVTOS = 13 // in.h:87:1:
+ IP_RECVTTL = 12 // in.h:86:1:
+ IP_RETOPTS = 7 // in.h:54:1:
+ IP_ROUTER_ALERT = 5 // in.h:80:1:
+ IP_TOS = 1 // in.h:49:1:
+ IP_TRANSPARENT = 19 // in.h:93:1:
+ IP_TTL = 2 // in.h:50:1:
+ IP_UNBLOCK_SOURCE = 37 // in.h:124:1:
+ IP_UNICAST_IF = 50 // in.h:130:1:
+ IP_XFRM_POLICY = 17 // in.h:91:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
+ MCAST_EXCLUDE = 0 // in.h:76:1:
+ MCAST_INCLUDE = 1 // in.h:77:1:
+ MCAST_JOIN_GROUP = 42 // in.h:66:1:
+ MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
+ MCAST_LEAVE_GROUP = 45 // in.h:69:1:
+ MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
+ MCAST_MSFILTER = 48 // in.h:72:1:
+ MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ PF_ALG = 38 // socket.h:82:1:
+ PF_APPLETALK = 5 // socket.h:48:1:
+ PF_ASH = 18 // socket.h:62:1:
+ PF_ATMPVC = 8 // socket.h:51:1:
+ PF_ATMSVC = 20 // socket.h:64:1:
+ PF_AX25 = 3 // socket.h:46:1:
+ PF_BLUETOOTH = 31 // socket.h:75:1:
+ PF_BRIDGE = 7 // socket.h:50:1:
+ PF_CAIF = 37 // socket.h:81:1:
+ PF_CAN = 29 // socket.h:73:1:
+ PF_DECnet = 12 // socket.h:55:1:
+ PF_ECONET = 19 // socket.h:63:1:
+ PF_FILE = 1 // socket.h:44:1:
+ PF_IB = 27 // socket.h:71:1:
+ PF_IEEE802154 = 36 // socket.h:80:1:
+ PF_INET = 2 // socket.h:45:1:
+ PF_INET6 = 10 // socket.h:53:1:
+ PF_IPX = 4 // socket.h:47:1:
+ PF_IRDA = 23 // socket.h:67:1:
+ PF_ISDN = 34 // socket.h:78:1:
+ PF_IUCV = 32 // socket.h:76:1:
+ PF_KCM = 41 // socket.h:85:1:
+ PF_KEY = 15 // socket.h:58:1:
+ PF_LLC = 26 // socket.h:70:1:
+ PF_LOCAL = 1 // socket.h:42:1:
+ PF_MAX = 46 // socket.h:90:1:
+ PF_MCTP = 45 // socket.h:89:1:
+ PF_MPLS = 28 // socket.h:72:1:
+ PF_NETBEUI = 13 // socket.h:56:1:
+ PF_NETLINK = 16 // socket.h:59:1:
+ PF_NETROM = 6 // socket.h:49:1:
+ PF_NFC = 39 // socket.h:83:1:
+ PF_PACKET = 17 // socket.h:61:1:
+ PF_PHONET = 35 // socket.h:79:1:
+ PF_PPPOX = 24 // socket.h:68:1:
+ PF_QIPCRTR = 42 // socket.h:86:1:
+ PF_RDS = 21 // socket.h:65:1:
+ PF_ROSE = 11 // socket.h:54:1:
+ PF_ROUTE = 16 // socket.h:60:1:
+ PF_RXRPC = 33 // socket.h:77:1:
+ PF_SECURITY = 14 // socket.h:57:1:
+ PF_SMC = 43 // socket.h:87:1:
+ PF_SNA = 22 // socket.h:66:1:
+ PF_TIPC = 30 // socket.h:74:1:
+ PF_UNIX = 1 // socket.h:43:1:
+ PF_UNSPEC = 0 // socket.h:41:1:
+ PF_VSOCK = 40 // socket.h:84:1:
+ PF_WANPIPE = 25 // socket.h:69:1:
+ PF_X25 = 9 // socket.h:52:1:
+ PF_XDP = 44 // socket.h:88:1:
+ SCM_TIMESTAMP = 29 // socket.h:156:1:
+ SCM_TIMESTAMPING = 37 // socket.h:158:1:
+ SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
+ SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:157:1:
+ SCM_TXTIME = 61 // socket.h:105:1:
+ SCM_WIFI_STATUS = 41 // socket.h:64:1:
+ SIOCATMARK = 0x8905 // sockios.h:10:1:
+ SIOCGPGRP = 0x8904 // sockios.h:9:1:
+ SIOCGSTAMPNS_OLD = 0x8907 // sockios.h:12:1:
+ SIOCGSTAMP_OLD = 0x8906 // sockios.h:11:1:
+ SIOCSPGRP = 0x8902 // sockios.h:7:1:
+ SOL_AAL = 265 // socket.h:153:1:
+ SOL_ALG = 279 // socket.h:167:1:
+ SOL_ATM = 264 // socket.h:152:1:
+ SOL_BLUETOOTH = 274 // socket.h:162:1:
+ SOL_CAIF = 278 // socket.h:166:1:
+ SOL_DCCP = 269 // socket.h:157:1:
+ SOL_DECNET = 261 // socket.h:149:1:
+ SOL_ICMPV6 = 58 // in.h:249:1:
+ SOL_IP = 0 // in.h:135:1:
+ SOL_IPV6 = 41 // in.h:248:1:
+ SOL_IRDA = 266 // socket.h:154:1:
+ SOL_IUCV = 277 // socket.h:165:1:
+ SOL_KCM = 281 // socket.h:169:1:
+ SOL_LLC = 268 // socket.h:156:1:
+ SOL_MCTP = 285 // socket.h:173:1:
+ SOL_MPTCP = 284 // socket.h:172:1:
+ SOL_NETBEUI = 267 // socket.h:155:1:
+ SOL_NETLINK = 270 // socket.h:158:1:
+ SOL_NFC = 280 // socket.h:168:1:
+ SOL_PACKET = 263 // socket.h:151:1:
+ SOL_PNPIPE = 275 // socket.h:163:1:
+ SOL_PPPOL2TP = 273 // socket.h:161:1:
+ SOL_RAW = 255 // socket.h:148:1:
+ SOL_RDS = 276 // socket.h:164:1:
+ SOL_RXRPC = 272 // socket.h:160:1:
+ SOL_SMC = 286 // socket.h:174:1:
+ SOL_SOCKET = 1 // socket.h:9:1:
+ SOL_TIPC = 271 // socket.h:159:1:
+ SOL_TLS = 282 // socket.h:170:1:
+ SOL_X25 = 262 // socket.h:150:1:
+ SOL_XDP = 283 // socket.h:171:1:
+ SOMAXCONN = 4096 // socket.h:177:1:
+ SO_ACCEPTCONN = 30 // socket.h:51:1:
+ SO_ATTACH_BPF = 50 // socket.h:82:1:
+ SO_ATTACH_FILTER = 26 // socket.h:45:1:
+ SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
+ SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
+ SO_BINDTODEVICE = 25 // socket.h:42:1:
+ SO_BINDTOIFINDEX = 62 // socket.h:107:1:
+ SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
+ SO_BROADCAST = 6 // socket.h:16:1:
+ SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUF_LOCK = 72 // socket.h:127:1:
+ SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_BUSY_POLL_BUDGET = 70 // socket.h:123:1:
+ SO_CNX_ADVICE = 53 // socket.h:88:1:
+ SO_COOKIE = 57 // socket.h:96:1:
+ SO_DEBUG = 1 // socket.h:11:1:
+ SO_DETACH_BPF = 27 // socket.h:83:1:
+ SO_DETACH_FILTER = 27 // socket.h:46:1:
+ SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
+ SO_DOMAIN = 39 // socket.h:59:1:
+ SO_DONTROUTE = 5 // socket.h:15:1:
+ SO_ERROR = 4 // socket.h:14:1:
+ SO_GET_FILTER = 26 // socket.h:47:1:
+ SO_INCOMING_CPU = 49 // socket.h:80:1:
+ SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
+ SO_KEEPALIVE = 9 // socket.h:21:1:
+ SO_LINGER = 13 // socket.h:25:1:
+ SO_LOCK_FILTER = 44 // socket.h:70:1:
+ SO_MARK = 36 // socket.h:56:1:
+ SO_MAX_PACING_RATE = 47 // socket.h:76:1:
+ SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NETNS_COOKIE = 71 // socket.h:125:1:
+ SO_NOFCS = 43 // socket.h:68:1:
+ SO_NO_CHECK = 11 // socket.h:23:1:
+ SO_OOBINLINE = 10 // socket.h:22:1:
+ SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSPIDFD = 76 // socket.h:135:1:
+ SO_PASSSEC = 34 // socket.h:54:1:
+ SO_PEEK_OFF = 42 // socket.h:65:1:
+ SO_PEERCRED = 17 // socket.h:30:1:
+ SO_PEERGROUPS = 59 // socket.h:100:1:
+ SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERPIDFD = 77 // socket.h:136:1:
+ SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PREFER_BUSY_POLL = 69 // socket.h:122:1:
+ SO_PRIORITY = 12 // socket.h:24:1:
+ SO_PROTOCOL = 38 // socket.h:58:1:
+ SO_RCVBUF = 8 // socket.h:18:1:
+ SO_RCVBUFFORCE = 33 // socket.h:20:1:
+ SO_RCVLOWAT = 18 // socket.h:31:1:
+ SO_RCVMARK = 75 // socket.h:133:1:
+ SO_RCVTIMEO = 20 // socket.h:145:1:
+ SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
+ SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_RESERVE_MEM = 73 // socket.h:129:1:
+ SO_REUSEADDR = 2 // socket.h:12:1:
+ SO_REUSEPORT = 15 // socket.h:27:1:
+ SO_RXQ_OVFL = 40 // socket.h:61:1:
+ SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
+ SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
+ SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
+ SO_SNDBUF = 7 // socket.h:17:1:
+ SO_SNDBUFFORCE = 32 // socket.h:19:1:
+ SO_SNDLOWAT = 19 // socket.h:32:1:
+ SO_SNDTIMEO = 21 // socket.h:146:1:
+ SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
+ SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
+ SO_TIMESTAMP = 29 // socket.h:141:1:
+ SO_TIMESTAMPING = 37 // socket.h:143:1:
+ SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
+ SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
+ SO_TIMESTAMPNS = 35 // socket.h:142:1:
+ SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
+ SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
+ SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
+ SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXREHASH = 74 // socket.h:131:1:
+ SO_TXTIME = 61 // socket.h:104:1:
+ SO_TYPE = 3 // socket.h:13:1:
+ SO_WIFI_STATUS = 41 // socket.h:63:1:
+ SO_ZEROCOPY = 60 // socket.h:102:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LINUX_STDDEF_H = 0 // stddef.h:3:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_NETINET_IN_H = 1 // in.h:19:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_SS_SIZE = 128 // sockaddr.h:40:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_SOCKET_H = 1 // socket.h:20:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Bits in the FLAGS argument to `send', `recv', et al.
-const ( /* socket.h:200:1: */
+const ( /* socket.h:205:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
@@ -552,13 +479,13 @@ const ( /* socket.h:200:1: */
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
-const ( /* socket.h:332:1: */
+const ( /* socket.h:363:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -598,6 +525,111 @@ const ( /* socket_type.h:24:1: */
SOCK_NONBLOCK = 2048
)
+// 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.
+const ( /* in.h:105:1: */
+ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
+ IPPROTO_ROUTING = 43 // IPv6 routing header.
+ IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
+ IPPROTO_ICMPV6 = 58 // ICMPv6.
+ IPPROTO_NONE = 59 // IPv6 no next header.
+ IPPROTO_DSTOPTS = 60 // IPv6 destination options.
+ IPPROTO_MH = 135
+)
+
+// Standard well-known ports.
+const ( /* in.h:128:1: */
+ IPPORT_ECHO = 7 // Echo service.
+ IPPORT_DISCARD = 9 // Discard transmissions service.
+ IPPORT_SYSTAT = 11 // System status service.
+ IPPORT_DAYTIME = 13 // Time of day service.
+ IPPORT_NETSTAT = 15 // Network status service.
+ IPPORT_FTP = 21 // File Transfer Protocol.
+ IPPORT_TELNET = 23 // Telnet protocol.
+ IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
+ IPPORT_TIMESERVER = 37 // Timeserver service.
+ IPPORT_NAMESERVER = 42 // Domain Name Service.
+ IPPORT_WHOIS = 43 // Internet Whois service.
+ IPPORT_MTP = 57
+
+ IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
+ IPPORT_RJE = 77
+ IPPORT_FINGER = 79 // Finger service.
+ IPPORT_TTYLINK = 87
+ IPPORT_SUPDUP = 95 // SUPDUP protocol.
+
+ IPPORT_EXECSERVER = 512 // execd service.
+ IPPORT_LOGINSERVER = 513 // rlogind service.
+ IPPORT_CMDSERVER = 514
+ IPPORT_EFSSERVER = 520
+
+ // UDP ports.
+ IPPORT_BIFFUDP = 512
+ IPPORT_WHOSERVER = 513
+ IPPORT_ROUTESERVER = 520
+
+ // Ports less than this value are reserved for privileged processes.
+ IPPORT_RESERVED = 1024
+
+ // Ports greater this value are reserved for (non-privileged) servers.
+ IPPORT_USERRESERVED = 5000
+)
+
+// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+
+// Advanced API (RFC3542) (1).
+
+// Advanced API (RFC3542) (2).
+
+// RFC5014.
+
+// RFC5082.
+
+// Obsolete synonyms for the above.
+
+// IPV6_MTU_DISCOVER values.
+
+// Socket level values for IPv6.
+
+// Routing header options for IPv6.
+
+// Standard well-defined IP protocols.
+const ( /* in.h:40:1: */
+ IPPROTO_IP = 0 // Dummy protocol for TCP.
+ IPPROTO_ICMP = 1 // Internet Control Message Protocol.
+ IPPROTO_IGMP = 2 // Internet Group Management Protocol.
+ IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
+ IPPROTO_TCP = 6 // Transmission Control Protocol.
+ IPPROTO_EGP = 8 // Exterior Gateway Protocol.
+ IPPROTO_PUP = 12 // PUP protocol.
+ IPPROTO_UDP = 17 // User Datagram Protocol.
+ IPPROTO_IDP = 22 // XNS IDP protocol.
+ IPPROTO_TP = 29 // SO Transport Protocol Class 4.
+ IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
+ IPPROTO_IPV6 = 41 // IPv6 header.
+ IPPROTO_RSVP = 46 // Reservation Protocol.
+ IPPROTO_GRE = 47 // General Routing Encapsulation.
+ IPPROTO_ESP = 50 // encapsulating security payload.
+ IPPROTO_AH = 51 // authentication header.
+ IPPROTO_MTP = 92 // Multicast Transport Protocol.
+ IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
+ IPPROTO_ENCAP = 98 // Encapsulation Header.
+ IPPROTO_PIM = 103 // Protocol Independent Multicast.
+ IPPROTO_COMP = 108 // Compression Header Protocol.
+ IPPROTO_L2TP = 115 // Layer 2 Tunnelling Protocol.
+ IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
+ IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
+ IPPROTO_MPLS = 137 // MPLS in IP.
+ IPPROTO_ETHERNET = 143 // Ethernet-within-IPv6 Encapsulation.
+ IPPROTO_RAW = 255 // Raw IP packets.
+ IPPROTO_MPTCP = 262 // Multipath TCP connection.
+ IPPROTO_MAX = 263
+)
+
// The following constants should be used for the second parameter of
//
// `shutdown'.
@@ -625,7 +657,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -642,7 +674,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -674,6 +706,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -689,12 +723,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -735,6 +772,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -805,6 +844,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -823,9 +918,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -853,7 +954,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -874,23 +976,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -903,6 +1006,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -923,8 +1028,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -934,6 +1039,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -962,8 +1070,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -994,11 +1107,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -1008,11 +1124,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1046,6 +1178,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -1059,13 +1207,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// Define uintN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1083,7 +1248,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1102,7 +1267,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1119,11 +1284,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1140,7 +1319,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -1159,14 +1338,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -1206,8 +1385,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1221,14 +1400,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -1239,10 +1416,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1269,7 +1448,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -1281,69 +1460,70 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */
-type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */
-type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */
-type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
+type Uint8_t = uint8 /* stdint-uintn.h:24:19 */
+type Uint16_t = uint16 /* stdint-uintn.h:25:20 */
+type Uint32_t = uint32 /* stdint-uintn.h:26:20 */
+type Uint64_t = uint64 /* stdint-uintn.h:27:20 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -1358,10 +1538,10 @@ type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
// Structure for scatter/gather I/O.
type Iovec = struct {
Fiov_base uintptr
- Fiov_len Size_t
+ Fiov_len uint64
} /* struct_iovec.h:26:1 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1433,7 +1613,7 @@ type Iovec = struct {
// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
// `struct msghdr', and `struct linger' types.
// System-specific socket constants and types. Linux version.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1450,7 +1630,7 @@ type Iovec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1518,7 +1698,7 @@ type Iovec = struct {
// A null pointer constant.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1537,7 +1717,7 @@ type Iovec = struct {
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1555,7 +1735,7 @@ type Iovec = struct {
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1574,42 +1754,42 @@ type Iovec = struct {
// Never include this file directly; use <sys/types.h> instead.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1629,10 +1809,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1652,10 +1832,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1675,10 +1855,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1698,9 +1878,9 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1776,7 +1956,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1794,7 +1974,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1813,22 +1993,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1847,7 +2027,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1866,7 +2046,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1886,7 +2066,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1903,9 +2083,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1917,7 +2096,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1940,14 +2119,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1967,7 +2146,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1988,11 +2167,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -2001,25 +2180,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2038,7 +2217,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2077,7 +2256,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2092,24 +2273,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2126,9 +2292,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2145,56 +2310,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -2210,8 +2345,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2228,16 +2363,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -2250,9 +2389,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2269,6 +2425,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -2276,26 +2437,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -2338,7 +2502,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -2362,7 +2530,7 @@ type Pthread_barrierattr_t = struct {
} /* pthreadtypes.h:118:3 */
// Type for length arguments in socket calls.
-type Socklen_t = X__socklen_t /* socket.h:33:21 */
+type Socklen_t = uint32 /* socket.h:33:21 */
// Protocol families.
@@ -2377,7 +2545,7 @@ type Socklen_t = X__socklen_t /* socket.h:33:21 */
// Get the definition of the macro to define the common sockaddr members.
// Definition of struct sockaddr_* common members and sizes, generic version.
-// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// Copyright (C) 1995-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2407,41 +2575,41 @@ type Sa_family_t = uint16 /* sockaddr.h:28:28 */
// Structure describing a generic socket address.
type Sockaddr = struct {
- Fsa_family Sa_family_t
+ Fsa_family uint16
Fsa_data [14]int8
-} /* socket.h:178:1 */
+} /* socket.h:183:1 */
// Structure large enough to hold any socket address (with the historical
// exception of AF_UNIX).
type Sockaddr_storage = struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
-} /* socket.h:191:1 */
+} /* socket.h:196:1 */
// Structure describing messages sent by
//
// `sendmsg' and received by `recvmsg'.
type Msghdr = struct {
Fmsg_name uintptr
- Fmsg_namelen Socklen_t
+ Fmsg_namelen uint32
F__ccgo_pad1 [4]byte
Fmsg_iov uintptr
- Fmsg_iovlen Size_t
+ Fmsg_iovlen uint64
Fmsg_control uintptr
- Fmsg_controllen Size_t
+ Fmsg_controllen uint64
Fmsg_flags int32
F__ccgo_pad2 [4]byte
-} /* socket.h:257:1 */
+} /* socket.h:262:1 */
// Structure used for storage of ancillary data object information.
type Cmsghdr = struct {
F__ccgo_pad1 [0]uint64
- Fcmsg_len Size_t
+ Fcmsg_len uint64
Fcmsg_level int32
Fcmsg_type int32
-} /* socket.h:275:1 */
+} /* socket.h:280:1 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -2449,6 +2617,31 @@ type Cmsghdr = struct {
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// *
+// __struct_group() - Create a mirrored named and anonyomous struct
+//
+// @TAG: The tag name for the named sub-struct (usually empty)
+// @NAME: The identifier name of the mirrored sub-struct
+// @ATTRS: Any struct attributes (usually empty)
+// @MEMBERS: The member declarations for the mirrored structs
+//
+// Used to create an anonymous union of two structs with identical layout
+// and size: one anonymous and one named. The former's members can be used
+// normally without sub-struct naming, and the latter can be used to
+// reason about the start, end, and size of the group of struct members.
+// The named struct can also be explicitly tagged for layer reuse, as well
+// as both having struct attributes appended.
+
+// *
+// __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+//
+// @TYPE: The type of each flexible array element
+// @NAME: The name of the flexible array member
+//
+// In order to have a flexible array member in a union or alone in a
+// struct, it needs to be wrapped in an anonymous struct with at least 1
+// named member, but that member can be empty.
+
// This allows for 1024 file descriptors: if NR_OPEN is ever grown
// beyond that you'll have to change this too. But 1024 fd's seem to be
// enough even for such "real" unices like OSF/1, so hopefully this is
@@ -2471,28 +2664,14 @@ type X__kernel_key_t = int32 /* posix_types.h:33:13 */
type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// This file is generally used by user-level software, so you need to
-// be a little careful about namespace pollution etc. Also, we cannot
-// assume GCC is being used.
-
-type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
-type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
-
-type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
-
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// There seems to be no way of detecting this automatically from user
-// space, so 64 bit architectures should override this in their
-// bitsperlong.h. In particular, an architecture that supports
-// both 32 and 64 bit user space must not rely on CONFIG_64BIT
-// to decide it, but rather check a compiler provided macro.
+// In order to keep safe and avoid regression, only unify uapi
+// bitsperlong.h for some archs which are using newer toolchains
+// that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
+// See the following link for more info:
+// https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
// This file is generally used by user-level software, so you need to
// be a little careful about namespace pollution etc.
@@ -2503,7 +2682,7 @@ type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
type X__kernel_long_t = int64 /* posix_types.h:15:15 */
type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
-type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+type X__kernel_ino_t = uint64 /* posix_types.h:20:26 */
type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
@@ -2514,33 +2693,38 @@ type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
-type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+type X__kernel_suseconds_t = int64 /* posix_types.h:41:26 */
type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+type X__kernel_old_uid_t = uint32 /* posix_types.h:54:24 */
+type X__kernel_old_gid_t = uint32 /* posix_types.h:55:24 */
+
+type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
+
// Most 32 bit architectures use "unsigned int" size_t,
// and all 64 bit architectures use "unsigned long" size_t.
-type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
-type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
-type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+type X__kernel_size_t = uint64 /* posix_types.h:72:26 */
+type X__kernel_ssize_t = int64 /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = int64 /* posix_types.h:74:25 */
type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
// anything below here should be completely generic
-type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
-type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
-type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
-type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
-type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
-type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
-type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
-type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
-type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
-type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
-type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+type X__kernel_off_t = int64 /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = int64 /* posix_types.h:89:25 */
+type X__kernel_time_t = int64 /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = int64 /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -2560,7 +2744,7 @@ type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
type Linger = struct {
Fl_onoff int32
Fl_linger int32
-} /* socket.h:361:1 */
+} /* socket.h:392:1 */
// This is the 4.3 BSD `struct sockaddr' format, which is used as wire
//
@@ -2573,7 +2757,7 @@ type Osockaddr = struct {
// Define some macros helping to catch buffer overflows.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2593,11 +2777,11 @@ type Osockaddr = struct {
// Never include this file directly; use <sys/types.h> instead.
// Internet address.
-type In_addr_t = Uint32_t /* in.h:30:18 */
-type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
+type In_addr_t = uint32 /* in.h:30:18 */
+type In_addr = struct{ Fs_addr uint32 } /* in.h:31:1 */
// Get system-specific definitions.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2645,26 +2829,19 @@ type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
// 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_dst struct{ Fs_addr uint32 }
Fip_opts [40]int8
-} /* in.h:142:1 */
-
-// Like `struct ip_mreq' but including interface specification by index.
-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:149:1 */
+} /* in.h:145:1 */
// Structure used for IP_PKTINFO.
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:157:1 */
+ Fipi_spec_dst struct{ Fs_addr uint32 }
+ Fipi_addr struct{ Fs_addr uint32 }
+} /* in.h:152:1 */
// Type to represent a port.
-type In_port_t = Uint16_t /* in.h:119:18 */
+type In_port_t = uint16 /* in.h:125:18 */
// Definitions of the bits in an Internet address integer.
//
@@ -2674,6 +2851,8 @@ type In_port_t = Uint16_t /* in.h:119:18 */
// Address to accept any incoming messages.
// Address to send to all hosts.
// Address indicating an error return.
+// Dummy address for source of ICMPv6 errors converted to IPv4 (RFC
+// 7600).
// Network number for local host loopback.
// Address to loopback in software to local host.
@@ -2684,107 +2863,114 @@ type In_port_t = Uint16_t /* in.h:119:18 */
type In6_addr = struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
-} /* in.h:212:1 */
+} /* in.h:221:1 */
// ::1
// Structure describing an Internet socket address.
type Sockaddr_in = struct {
- Fsin_family Sa_family_t
- Fsin_port In_port_t
- Fsin_addr struct{ Fs_addr In_addr_t }
+ Fsin_family uint16
+ Fsin_port uint16
+ Fsin_addr struct{ Fs_addr uint32 }
Fsin_zero [8]uint8
-} /* in.h:238:1 */
+} /* in.h:247:1 */
// Ditto, for IPv6.
type Sockaddr_in6 = struct {
- Fsin6_family Sa_family_t
- Fsin6_port In_port_t
- Fsin6_flowinfo Uint32_t
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
Fsin6_addr struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
}
- Fsin6_scope_id Uint32_t
-} /* in.h:253:1 */
+ Fsin6_scope_id uint32
+} /* in.h:262:1 */
// IPv4 multicast request.
type Ip_mreq = struct {
- Fimr_multiaddr struct{ Fs_addr In_addr_t }
- Fimr_interface struct{ Fs_addr In_addr_t }
-} /* in.h:265:1 */
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_interface struct{ Fs_addr uint32 }
+} /* in.h:274:1 */
+
+// IPv4 multicast request with interface index.
+type Ip_mreqn = struct {
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_address struct{ Fs_addr uint32 }
+ Fimr_ifindex int32
+} /* in.h:284: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:274:1 */
+ Fimr_multiaddr struct{ Fs_addr uint32 }
+ Fimr_interface struct{ Fs_addr uint32 }
+ Fimr_sourceaddr struct{ Fs_addr uint32 }
+} /* in.h:296:1 */
// Likewise, for IPv6.
type Ipv6_mreq = struct {
Fipv6mr_multiaddr struct {
F__in6_u struct {
F__ccgo_pad1 [0]uint32
- F__u6_addr8 [16]Uint8_t
+ F__u6_addr8 [16]uint8
}
}
Fipv6mr_interface uint32
-} /* in.h:289:1 */
+} /* in.h:311:1 */
// Multicast group request.
type Group_req = struct {
- Fgr_interface Uint32_t
+ Fgr_interface uint32
F__ccgo_pad1 [4]byte
Fgr_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:301:1 */
+} /* in.h:323:1 */
type Group_source_req = struct {
- Fgsr_interface Uint32_t
+ Fgsr_interface uint32
F__ccgo_pad1 [4]byte
Fgsr_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
Fgsr_source struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:310:1 */
+} /* in.h:332:1 */
// Full-state filter operations.
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:324:1 */
+ Fimsf_multiaddr struct{ Fs_addr uint32 }
+ Fimsf_interface struct{ Fs_addr uint32 }
+ Fimsf_fmode uint32
+ Fimsf_numsrc uint32
+ Fimsf_slist [1]struct{ Fs_addr uint32 }
+} /* in.h:346:1 */
type Group_filter = struct {
- Fgf_interface Uint32_t
+ Fgf_interface uint32
F__ccgo_pad1 [4]byte
Fgf_group struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
- Fgf_fmode Uint32_t
- Fgf_numsrc Uint32_t
+ Fgf_fmode uint32
+ Fgf_numsrc uint32
Fgf_slist [1]struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
}
-} /* in.h:345:1 */
+} /* in.h:367:1 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_mips64le.go b/vendor/modernc.org/libc/netinet/in/in_linux_mips64le.go
new file mode 100644
index 000000000..cfd5e88aa
--- /dev/null
+++ b/vendor/modernc.org/libc/netinet/in/in_linux_mips64le.go
@@ -0,0 +1,2790 @@
+// 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_linux_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 (
+ AF_ALG = 38 // socket.h:133:1:
+ AF_APPLETALK = 5 // socket.h:99:1:
+ AF_ASH = 18 // socket.h:113:1:
+ AF_ATMPVC = 8 // socket.h:102:1:
+ AF_ATMSVC = 20 // socket.h:115:1:
+ AF_AX25 = 3 // socket.h:97:1:
+ AF_BLUETOOTH = 31 // socket.h:126:1:
+ AF_BRIDGE = 7 // socket.h:101:1:
+ AF_CAIF = 37 // socket.h:132:1:
+ AF_CAN = 29 // socket.h:124:1:
+ AF_DECnet = 12 // socket.h:106:1:
+ AF_ECONET = 19 // socket.h:114:1:
+ AF_FILE = 1 // socket.h:95:1:
+ AF_IB = 27 // socket.h:122:1:
+ AF_IEEE802154 = 36 // socket.h:131:1:
+ AF_INET = 2 // socket.h:96:1:
+ AF_INET6 = 10 // socket.h:104:1:
+ AF_IPX = 4 // socket.h:98:1:
+ AF_IRDA = 23 // socket.h:118:1:
+ AF_ISDN = 34 // socket.h:129:1:
+ AF_IUCV = 32 // socket.h:127:1:
+ AF_KCM = 41 // socket.h:136:1:
+ AF_KEY = 15 // socket.h:109:1:
+ AF_LLC = 26 // socket.h:121:1:
+ AF_LOCAL = 1 // socket.h:93:1:
+ AF_MAX = 45 // socket.h:140:1:
+ AF_MPLS = 28 // socket.h:123:1:
+ AF_NETBEUI = 13 // socket.h:107:1:
+ AF_NETLINK = 16 // socket.h:110:1:
+ AF_NETROM = 6 // socket.h:100:1:
+ AF_NFC = 39 // socket.h:134:1:
+ AF_PACKET = 17 // socket.h:112:1:
+ AF_PHONET = 35 // socket.h:130:1:
+ AF_PPPOX = 24 // socket.h:119:1:
+ AF_QIPCRTR = 42 // socket.h:137:1:
+ AF_RDS = 21 // socket.h:116:1:
+ AF_ROSE = 11 // socket.h:105:1:
+ AF_ROUTE = 16 // socket.h:111:1:
+ AF_RXRPC = 33 // socket.h:128:1:
+ AF_SECURITY = 14 // socket.h:108:1:
+ AF_SMC = 43 // socket.h:138:1:
+ AF_SNA = 22 // socket.h:117:1:
+ AF_TIPC = 30 // socket.h:125:1:
+ AF_UNIX = 1 // socket.h:94:1:
+ AF_UNSPEC = 0 // socket.h:92:1:
+ AF_VSOCK = 40 // socket.h:135:1:
+ AF_WANPIPE = 25 // socket.h:120:1:
+ AF_X25 = 9 // socket.h:103:1:
+ AF_XDP = 44 // socket.h:139:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FIOGETOWN = 0x8903 // sockios.h:8:1:
+ FIOSETOWN = 0x8901 // sockios.h:6:1:
+ INET6_ADDRSTRLEN = 46 // in.h:234:1:
+ INET_ADDRSTRLEN = 16 // in.h:233:1:
+ IN_CLASSA_HOST = 16777215 // in.h:169:1:
+ IN_CLASSA_MAX = 128 // in.h:170:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:167:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:168:1:
+ IN_CLASSB_HOST = 65535 // in.h:175:1:
+ IN_CLASSB_MAX = 65536 // in.h:176:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:173:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:174:1:
+ IN_CLASSC_HOST = 255 // in.h:181:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:179:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:180:1:
+ IN_LOOPBACKNET = 127 // in.h:197:1:
+ IPV6_2292DSTOPTS = 4 // in.h:171:1:
+ IPV6_2292HOPLIMIT = 8 // in.h:175:1:
+ IPV6_2292HOPOPTS = 3 // in.h:170:1:
+ IPV6_2292PKTINFO = 2 // in.h:169:1:
+ IPV6_2292PKTOPTIONS = 6 // in.h:173:1:
+ IPV6_2292RTHDR = 5 // in.h:172:1:
+ IPV6_ADDRFORM = 1 // in.h:168:1:
+ IPV6_ADDR_PREFERENCES = 72 // in.h:223:1:
+ IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1:
+ IPV6_AUTHHDR = 10 // in.h:180:1:
+ IPV6_AUTOFLOWLABEL = 70 // in.h:220:1:
+ IPV6_CHECKSUM = 7 // in.h:174:1:
+ IPV6_DONTFRAG = 62 // in.h:214:1:
+ IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1:
+ IPV6_DSTOPTS = 59 // in.h:211:1:
+ IPV6_FREEBIND = 78 // in.h:233:1:
+ IPV6_HDRINCL = 36 // in.h:198:1:
+ IPV6_HOPLIMIT = 52 // in.h:204:1:
+ IPV6_HOPOPTS = 54 // in.h:206:1:
+ IPV6_IPSEC_POLICY = 34 // in.h:196:1:
+ IPV6_JOIN_ANYCAST = 27 // in.h:192:1:
+ IPV6_JOIN_GROUP = 20 // in.h:185:1:
+ IPV6_LEAVE_ANYCAST = 28 // in.h:193:1:
+ IPV6_LEAVE_GROUP = 21 // in.h:186:1:
+ IPV6_MINHOPCOUNT = 73 // in.h:226:1:
+ IPV6_MTU = 24 // in.h:189:1:
+ IPV6_MTU_DISCOVER = 23 // in.h:188:1:
+ IPV6_MULTICAST_ALL = 29 // in.h:194:1:
+ IPV6_MULTICAST_HOPS = 18 // in.h:183:1:
+ IPV6_MULTICAST_IF = 17 // in.h:182:1:
+ IPV6_MULTICAST_LOOP = 19 // in.h:184:1:
+ IPV6_NEXTHOP = 9 // in.h:179:1:
+ IPV6_ORIGDSTADDR = 74 // in.h:228:1:
+ IPV6_PATHMTU = 61 // in.h:213:1:
+ IPV6_PKTINFO = 50 // in.h:202:1:
+ IPV6_PMTUDISC_DO = 2 // in.h:246:1:
+ IPV6_PMTUDISC_DONT = 0 // in.h:244:1:
+ IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1:
+ IPV6_PMTUDISC_OMIT = 5 // in.h:249:1:
+ IPV6_PMTUDISC_PROBE = 3 // in.h:247:1:
+ IPV6_PMTUDISC_WANT = 1 // in.h:245:1:
+ IPV6_RECVDSTOPTS = 58 // in.h:210:1:
+ IPV6_RECVERR = 25 // in.h:190:1:
+ IPV6_RECVFRAGSIZE = 77 // in.h:232:1:
+ IPV6_RECVHOPLIMIT = 51 // in.h:203:1:
+ IPV6_RECVHOPOPTS = 53 // in.h:205:1:
+ IPV6_RECVORIGDSTADDR = 74 // in.h:229:1:
+ IPV6_RECVPATHMTU = 60 // in.h:212:1:
+ IPV6_RECVPKTINFO = 49 // in.h:201:1:
+ IPV6_RECVRTHDR = 56 // in.h:208:1:
+ IPV6_RECVTCLASS = 66 // in.h:217:1:
+ IPV6_ROUTER_ALERT = 22 // in.h:187:1:
+ IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1:
+ IPV6_RTHDR = 57 // in.h:209:1:
+ IPV6_RTHDRDSTOPTS = 55 // in.h:207:1:
+ IPV6_RTHDR_LOOSE = 0 // in.h:256:1:
+ IPV6_RTHDR_STRICT = 1 // in.h:257:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1:
+ IPV6_RXDSTOPTS = 59 // in.h:241:1:
+ IPV6_RXHOPOPTS = 54 // in.h:240:1:
+ IPV6_TCLASS = 67 // in.h:218:1:
+ IPV6_TRANSPARENT = 75 // in.h:230:1:
+ IPV6_UNICAST_HOPS = 16 // in.h:181:1:
+ IPV6_UNICAST_IF = 76 // in.h:231:1:
+ IPV6_V6ONLY = 26 // in.h:191:1:
+ IPV6_XFRM_POLICY = 35 // in.h:197:1:
+ IP_ADD_MEMBERSHIP = 35 // in.h:121:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1:
+ IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1:
+ IP_BLOCK_SOURCE = 38 // in.h:124:1:
+ IP_CHECKSUM = 23 // in.h:102:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1:
+ IP_DROP_MEMBERSHIP = 36 // in.h:122:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1:
+ IP_FREEBIND = 15 // in.h:89:1:
+ IP_HDRINCL = 3 // in.h:48:1:
+ IP_IPSEC_POLICY = 16 // in.h:90:1:
+ IP_MAX_MEMBERSHIPS = 20 // in.h:136:1:
+ IP_MINTTL = 21 // in.h:100:1:
+ IP_MSFILTER = 41 // in.h:127:1:
+ IP_MTU = 14 // in.h:88:1:
+ IP_MTU_DISCOVER = 10 // in.h:84:1:
+ IP_MULTICAST_ALL = 49 // in.h:128:1:
+ IP_MULTICAST_IF = 32 // in.h:118:1:
+ IP_MULTICAST_LOOP = 34 // in.h:120:1:
+ IP_MULTICAST_TTL = 33 // in.h:119:1:
+ IP_NODEFRAG = 22 // in.h:101:1:
+ IP_OPTIONS = 4 // in.h:47:1:
+ IP_ORIGDSTADDR = 20 // in.h:97:1:
+ IP_PASSSEC = 18 // in.h:92:1:
+ IP_PKTINFO = 8 // in.h:81:1:
+ IP_PKTOPTIONS = 9 // in.h:82:1:
+ IP_PMTUDISC = 10 // in.h:83:1:
+ IP_PMTUDISC_DO = 2 // in.h:109:1:
+ IP_PMTUDISC_DONT = 0 // in.h:107:1:
+ IP_PMTUDISC_INTERFACE = 4 // in.h:114:1:
+ IP_PMTUDISC_OMIT = 5 // in.h:116:1:
+ IP_PMTUDISC_PROBE = 3 // in.h:110:1:
+ IP_PMTUDISC_WANT = 1 // in.h:108:1:
+ IP_RECVERR = 11 // in.h:85:1:
+ IP_RECVFRAGSIZE = 25 // in.h:104:1:
+ IP_RECVOPTS = 6 // in.h:51:1:
+ IP_RECVORIGDSTADDR = 20 // in.h:98:1:
+ IP_RECVRETOPTS = 7 // in.h:53:1:
+ IP_RECVTOS = 13 // in.h:87:1:
+ IP_RECVTTL = 12 // in.h:86:1:
+ IP_RETOPTS = 7 // in.h:54:1:
+ IP_ROUTER_ALERT = 5 // in.h:80:1:
+ IP_TOS = 1 // in.h:49:1:
+ IP_TRANSPARENT = 19 // in.h:93:1:
+ IP_TTL = 2 // in.h:50:1:
+ IP_UNBLOCK_SOURCE = 37 // in.h:123:1:
+ IP_UNICAST_IF = 50 // in.h:129:1:
+ IP_XFRM_POLICY = 17 // in.h:91:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ MCAST_BLOCK_SOURCE = 43 // in.h:67:1:
+ MCAST_EXCLUDE = 0 // in.h:76:1:
+ MCAST_INCLUDE = 1 // in.h:77:1:
+ MCAST_JOIN_GROUP = 42 // in.h:66:1:
+ MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1:
+ MCAST_LEAVE_GROUP = 45 // in.h:69:1:
+ MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1:
+ MCAST_MSFILTER = 48 // in.h:72:1:
+ MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ PF_ALG = 38 // socket.h:82:1:
+ PF_APPLETALK = 5 // socket.h:48:1:
+ PF_ASH = 18 // socket.h:62:1:
+ PF_ATMPVC = 8 // socket.h:51:1:
+ PF_ATMSVC = 20 // socket.h:64:1:
+ PF_AX25 = 3 // socket.h:46:1:
+ PF_BLUETOOTH = 31 // socket.h:75:1:
+ PF_BRIDGE = 7 // socket.h:50:1:
+ PF_CAIF = 37 // socket.h:81:1:
+ PF_CAN = 29 // socket.h:73:1:
+ PF_DECnet = 12 // socket.h:55:1:
+ PF_ECONET = 19 // socket.h:63:1:
+ PF_FILE = 1 // socket.h:44:1:
+ PF_IB = 27 // socket.h:71:1:
+ PF_IEEE802154 = 36 // socket.h:80:1:
+ PF_INET = 2 // socket.h:45:1:
+ PF_INET6 = 10 // socket.h:53:1:
+ PF_IPX = 4 // socket.h:47:1:
+ PF_IRDA = 23 // socket.h:67:1:
+ PF_ISDN = 34 // socket.h:78:1:
+ PF_IUCV = 32 // socket.h:76:1:
+ PF_KCM = 41 // socket.h:85:1:
+ PF_KEY = 15 // socket.h:58:1:
+ PF_LLC = 26 // socket.h:70:1:
+ PF_LOCAL = 1 // socket.h:42:1:
+ PF_MAX = 45 // socket.h:89:1:
+ PF_MPLS = 28 // socket.h:72:1:
+ PF_NETBEUI = 13 // socket.h:56:1:
+ PF_NETLINK = 16 // socket.h:59:1:
+ PF_NETROM = 6 // socket.h:49:1:
+ PF_NFC = 39 // socket.h:83:1:
+ PF_PACKET = 17 // socket.h:61:1:
+ PF_PHONET = 35 // socket.h:79:1:
+ PF_PPPOX = 24 // socket.h:68:1:
+ PF_QIPCRTR = 42 // socket.h:86:1:
+ PF_RDS = 21 // socket.h:65:1:
+ PF_ROSE = 11 // socket.h:54:1:
+ PF_ROUTE = 16 // socket.h:60:1:
+ PF_RXRPC = 33 // socket.h:77:1:
+ PF_SECURITY = 14 // socket.h:57:1:
+ PF_SMC = 43 // socket.h:87:1:
+ PF_SNA = 22 // socket.h:66:1:
+ PF_TIPC = 30 // socket.h:74:1:
+ PF_UNIX = 1 // socket.h:43:1:
+ PF_UNSPEC = 0 // socket.h:41:1:
+ PF_VSOCK = 40 // socket.h:84:1:
+ PF_WANPIPE = 25 // socket.h:69:1:
+ PF_X25 = 9 // socket.h:52:1:
+ PF_XDP = 44 // socket.h:88:1:
+ SCM_TIMESTAMP = 29 // socket.h:140:1:
+ SCM_TIMESTAMPING = 37 // socket.h:142:1:
+ SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
+ SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:141:1:
+ SCM_TXTIME = 61 // socket.h:105:1:
+ SCM_WIFI_STATUS = 41 // socket.h:64:1:
+ SIOCATMARK = 0x8905 // sockios.h:10:1:
+ SIOCGPGRP = 0x8904 // sockios.h:9:1:
+ SIOCGSTAMP = 0x8906 // sockios.h:11:1:
+ SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
+ SIOCSPGRP = 0x8902 // sockios.h:7:1:
+ SOL_AAL = 265 // socket.h:151:1:
+ SOL_ALG = 279 // socket.h:165:1:
+ SOL_ATM = 264 // socket.h:150:1:
+ SOL_BLUETOOTH = 274 // socket.h:160:1:
+ SOL_CAIF = 278 // socket.h:164:1:
+ SOL_DCCP = 269 // socket.h:155:1:
+ SOL_DECNET = 261 // socket.h:147:1:
+ SOL_ICMPV6 = 58 // in.h:253:1:
+ SOL_IP = 0 // in.h:132:1:
+ SOL_IPV6 = 41 // in.h:252:1:
+ SOL_IRDA = 266 // socket.h:152:1:
+ SOL_IUCV = 277 // socket.h:163:1:
+ SOL_KCM = 281 // socket.h:167:1:
+ SOL_LLC = 268 // socket.h:154:1:
+ SOL_NETBEUI = 267 // socket.h:153:1:
+ SOL_NETLINK = 270 // socket.h:156:1:
+ SOL_NFC = 280 // socket.h:166:1:
+ SOL_PACKET = 263 // socket.h:149:1:
+ SOL_PNPIPE = 275 // socket.h:161:1:
+ SOL_PPPOL2TP = 273 // socket.h:159:1:
+ SOL_RAW = 255 // socket.h:146:1:
+ SOL_RDS = 276 // socket.h:162:1:
+ SOL_RXRPC = 272 // socket.h:158:1:
+ SOL_SOCKET = 1 // socket.h:9:1:
+ SOL_TIPC = 271 // socket.h:157:1:
+ SOL_TLS = 282 // socket.h:168:1:
+ SOL_X25 = 262 // socket.h:148:1:
+ SOL_XDP = 283 // socket.h:169:1:
+ SOMAXCONN = 4096 // socket.h:172:1:
+ SO_ACCEPTCONN = 30 // socket.h:51:1:
+ SO_ATTACH_BPF = 50 // socket.h:82:1:
+ SO_ATTACH_FILTER = 26 // socket.h:45:1:
+ SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
+ SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
+ SO_BINDTODEVICE = 25 // socket.h:42:1:
+ SO_BINDTOIFINDEX = 62 // socket.h:107:1:
+ SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
+ SO_BROADCAST = 6 // socket.h:16:1:
+ SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_CNX_ADVICE = 53 // socket.h:88:1:
+ SO_COOKIE = 57 // socket.h:96:1:
+ SO_DEBUG = 1 // socket.h:11:1:
+ SO_DETACH_BPF = 27 // socket.h:83:1:
+ SO_DETACH_FILTER = 27 // socket.h:46:1:
+ SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
+ SO_DOMAIN = 39 // socket.h:59:1:
+ SO_DONTROUTE = 5 // socket.h:15:1:
+ SO_ERROR = 4 // socket.h:14:1:
+ SO_GET_FILTER = 26 // socket.h:47:1:
+ SO_INCOMING_CPU = 49 // socket.h:80:1:
+ SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
+ SO_KEEPALIVE = 9 // socket.h:21:1:
+ SO_LINGER = 13 // socket.h:25:1:
+ SO_LOCK_FILTER = 44 // socket.h:70:1:
+ SO_MARK = 36 // socket.h:56:1:
+ SO_MAX_PACING_RATE = 47 // socket.h:76:1:
+ SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NOFCS = 43 // socket.h:68:1:
+ SO_NO_CHECK = 11 // socket.h:23:1:
+ SO_OOBINLINE = 10 // socket.h:22:1:
+ SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSSEC = 34 // socket.h:54:1:
+ SO_PEEK_OFF = 42 // socket.h:65:1:
+ SO_PEERCRED = 17 // socket.h:30:1:
+ SO_PEERGROUPS = 59 // socket.h:100:1:
+ SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PRIORITY = 12 // socket.h:24:1:
+ SO_PROTOCOL = 38 // socket.h:58:1:
+ SO_RCVBUF = 8 // socket.h:18:1:
+ SO_RCVBUFFORCE = 33 // socket.h:20:1:
+ SO_RCVLOWAT = 18 // socket.h:31:1:
+ SO_RCVTIMEO = 20 // socket.h:129:1:
+ SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
+ SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_REUSEADDR = 2 // socket.h:12:1:
+ SO_REUSEPORT = 15 // socket.h:27:1:
+ SO_RXQ_OVFL = 40 // socket.h:61:1:
+ SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
+ SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
+ SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
+ SO_SNDBUF = 7 // socket.h:17:1:
+ SO_SNDBUFFORCE = 32 // socket.h:19:1:
+ SO_SNDLOWAT = 19 // socket.h:32:1:
+ SO_SNDTIMEO = 21 // socket.h:130:1:
+ SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
+ SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
+ SO_TIMESTAMP = 29 // socket.h:125:1:
+ SO_TIMESTAMPING = 37 // socket.h:127:1:
+ SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
+ SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
+ SO_TIMESTAMPNS = 35 // socket.h:126:1:
+ SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
+ SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
+ SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
+ SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXTIME = 61 // socket.h:104:1:
+ SO_TYPE = 3 // socket.h:13:1:
+ SO_WIFI_STATUS = 41 // socket.h:63:1:
+ SO_ZEROCOPY = 60 // socket.h:102:1:
+ X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_NETINET_IN_H = 1 // in.h:19:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_SS_SIZE = 128 // sockaddr.h:40:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_SOCKET_H = 1 // socket.h:20:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Standard well-known ports.
+const ( /* in.h:122:1: */
+ IPPORT_ECHO = 7 // Echo service.
+ IPPORT_DISCARD = 9 // Discard transmissions service.
+ IPPORT_SYSTAT = 11 // System status service.
+ IPPORT_DAYTIME = 13 // Time of day service.
+ IPPORT_NETSTAT = 15 // Network status service.
+ IPPORT_FTP = 21 // File Transfer Protocol.
+ IPPORT_TELNET = 23 // Telnet protocol.
+ IPPORT_SMTP = 25 // Simple Mail Transfer Protocol.
+ IPPORT_TIMESERVER = 37 // Timeserver service.
+ IPPORT_NAMESERVER = 42 // Domain Name Service.
+ IPPORT_WHOIS = 43 // Internet Whois service.
+ IPPORT_MTP = 57
+
+ IPPORT_TFTP = 69 // Trivial File Transfer Protocol.
+ IPPORT_RJE = 77
+ IPPORT_FINGER = 79 // Finger service.
+ IPPORT_TTYLINK = 87
+ IPPORT_SUPDUP = 95 // SUPDUP protocol.
+
+ IPPORT_EXECSERVER = 512 // execd service.
+ IPPORT_LOGINSERVER = 513 // rlogind service.
+ IPPORT_CMDSERVER = 514
+ IPPORT_EFSSERVER = 520
+
+ // UDP ports.
+ IPPORT_BIFFUDP = 512
+ IPPORT_WHOSERVER = 513
+ IPPORT_ROUTESERVER = 520
+
+ // Ports less than this value are reserved for privileged processes.
+ IPPORT_RESERVED = 1024
+
+ // Ports greater this value are reserved for (non-privileged) servers.
+ IPPORT_USERRESERVED = 5000
+)
+
+// Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+
+// Advanced API (RFC3542) (1).
+
+// Advanced API (RFC3542) (2).
+
+// RFC5014.
+
+// RFC5082.
+
+// Obsolete synonyms for the above.
+
+// IPV6_MTU_DISCOVER values.
+
+// Socket level values for IPv6.
+
+// Routing header options for IPv6.
+
+// Standard well-defined IP protocols.
+const ( /* in.h:40:1: */
+ IPPROTO_IP = 0 // Dummy protocol for TCP.
+ IPPROTO_ICMP = 1 // Internet Control Message Protocol.
+ IPPROTO_IGMP = 2 // Internet Group Management Protocol.
+ IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94).
+ IPPROTO_TCP = 6 // Transmission Control Protocol.
+ IPPROTO_EGP = 8 // Exterior Gateway Protocol.
+ IPPROTO_PUP = 12 // PUP protocol.
+ IPPROTO_UDP = 17 // User Datagram Protocol.
+ IPPROTO_IDP = 22 // XNS IDP protocol.
+ IPPROTO_TP = 29 // SO Transport Protocol Class 4.
+ IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol.
+ IPPROTO_IPV6 = 41 // IPv6 header.
+ IPPROTO_RSVP = 46 // Reservation Protocol.
+ IPPROTO_GRE = 47 // General Routing Encapsulation.
+ IPPROTO_ESP = 50 // encapsulating security payload.
+ IPPROTO_AH = 51 // authentication header.
+ IPPROTO_MTP = 92 // Multicast Transport Protocol.
+ IPPROTO_BEETPH = 94 // IP option pseudo header for BEET.
+ IPPROTO_ENCAP = 98 // Encapsulation Header.
+ IPPROTO_PIM = 103 // Protocol Independent Multicast.
+ IPPROTO_COMP = 108 // Compression Header Protocol.
+ IPPROTO_SCTP = 132 // Stream Control Transmission Protocol.
+ IPPROTO_UDPLITE = 136 // UDP-Lite protocol.
+ IPPROTO_MPLS = 137 // MPLS in IP.
+ IPPROTO_RAW = 255 // Raw IP packets.
+ IPPROTO_MAX = 256
+)
+
+// 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.
+const ( /* in.h:99:1: */
+ IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options.
+ IPPROTO_ROUTING = 43 // IPv6 routing header.
+ IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header.
+ IPPROTO_ICMPV6 = 58 // ICMPv6.
+ IPPROTO_NONE = 59 // IPv6 no next header.
+ IPPROTO_DSTOPTS = 60 // IPv6 destination options.
+ IPPROTO_MH = 135
+)
+
+// Bits in the FLAGS argument to `send', `recv', et al.
+const ( /* socket.h:200:1: */
+ MSG_OOB = 1 // Process out-of-band data.
+ MSG_PEEK = 2 // Peek at incoming messages.
+ MSG_DONTROUTE = 4 // Don't use local routing.
+ MSG_CTRUNC = 8 // Control data lost before delivery.
+ MSG_PROXY = 16 // Supply or ask second address.
+ MSG_TRUNC = 32
+ MSG_DONTWAIT = 64 // Nonblocking IO.
+ MSG_EOR = 128 // End of record.
+ MSG_WAITALL = 256 // Wait for a full request.
+ MSG_FIN = 512
+ MSG_SYN = 1024
+ MSG_CONFIRM = 2048 // Confirm path validity.
+ MSG_RST = 4096
+ MSG_ERRQUEUE = 8192 // Fetch message from error queue.
+ MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
+ MSG_MORE = 32768 // Sender will send more.
+ MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
+ MSG_BATCH = 262144 // sendmmsg: more messages coming.
+ MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
+ MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
+
+ MSG_CMSG_CLOEXEC = 1073741824
+)
+
+// Socket level message types. This must match the definitions in
+//
+// <linux/socket.h>.
+const ( /* socket.h:332:1: */
+ SCM_RIGHTS = 1
+)
+
+// Get the architecture-dependent definition of enum __socket_type.
+// Define enum __socket_type for generic Linux.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Types of sockets.
+const ( /* socket_type.h:24:1: */
+ SOCK_STREAM = 1 // Sequenced, reliable, connection-based
+ // byte streams.
+ SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
+ // of fixed maximum length.
+ SOCK_RAW = 3 // Raw protocol interface.
+ SOCK_RDM = 4 // Reliably-delivered messages.
+ SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
+ // datagrams of fixed maximum length.
+ SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
+ SOCK_PACKET = 10 // Linux specific way of getting packets
+ // at the dev level. For writing rarp and
+ // other similar things on the user level.
+
+ // Flags to be ORed into the type parameter of socket and socketpair and
+ // used for the flags parameter of paccept.
+
+ SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
+ // new descriptor(s).
+ SOCK_NONBLOCK = 2048
+)
+
+// The following constants should be used for the second parameter of
+//
+// `shutdown'.
+const ( /* socket.h:41:1: */
+ SHUT_RD = 0 // No more receptions.
+ SHUT_WR = 1 // No more transmissions.
+ SHUT_RDWR = 2
+)
+
+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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// Define uintN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */
+type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */
+type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */
+type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Structure for scatter/gather I/O.
+type Iovec = struct {
+ Fiov_base uintptr
+ Fiov_len Size_t
+} /* struct_iovec.h:26:1 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This operating system-specific header file defines the SOCK_*, PF_*,
+// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
+// `struct msghdr', and `struct linger' types.
+// System-specific socket constants and types. Linux version.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Type for length arguments in socket calls.
+type Socklen_t = X__socklen_t /* socket.h:33:21 */
+
+// Protocol families.
+
+// Address families.
+
+// Socket level values. Others are defined in the appropriate headers.
+//
+// XXX These definitions also should go into the appropriate headers as
+// far as they are available.
+
+// Maximum queue length specifiable by listen.
+
+// Get the definition of the macro to define the common sockaddr members.
+// Definition of struct sockaddr_* common members and sizes, generic version.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/socket.h> instead.
+
+// POSIX.1g specifies this type name for the `sa_family' member.
+type Sa_family_t = uint16 /* sockaddr.h:28:28 */
+
+// This macro is used to declare the initial common members
+// of the data types used for socket addresses, `struct sockaddr',
+// `struct sockaddr_in', `struct sockaddr_un', etc.
+
+// Size of struct sockaddr_storage.
+
+// Structure describing a generic socket address.
+type Sockaddr = struct {
+ Fsa_family Sa_family_t
+ Fsa_data [14]int8
+} /* socket.h:178:1 */
+
+// Structure large enough to hold any socket address (with the historical
+// exception of AF_UNIX).
+
+type Sockaddr_storage = struct {
+ Fss_family Sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
+} /* socket.h:191:1 */
+
+// Structure describing messages sent by
+//
+// `sendmsg' and received by `recvmsg'.
+type Msghdr = struct {
+ Fmsg_name uintptr
+ Fmsg_namelen Socklen_t
+ F__ccgo_pad1 [4]byte
+ Fmsg_iov uintptr
+ Fmsg_iovlen Size_t
+ Fmsg_control uintptr
+ Fmsg_controllen Size_t
+ Fmsg_flags int32
+ F__ccgo_pad2 [4]byte
+} /* socket.h:257:1 */
+
+// Structure used for storage of ancillary data object information.
+type Cmsghdr = struct {
+ F__ccgo_pad1 [0]uint64
+ Fcmsg_len Size_t
+ Fcmsg_level int32
+ Fcmsg_type int32
+} /* socket.h:275:1 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This allows for 1024 file descriptors: if NR_OPEN is ever grown
+// beyond that you'll have to change this too. But 1024 fd's seem to be
+// enough even for such "real" unices like OSF/1, so hopefully this is
+// one limit that doesn't have to be changed [again].
+//
+// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
+// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
+// place for them. Solved by having dummy defines in <sys/time.h>.
+
+// This macro may have been defined in <gnu/types.h>. But we always
+// use the one here.
+
+type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
+
+// Type of a signal handler.
+type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
+
+// Type of a SYSV IPC key.
+type X__kernel_key_t = int32 /* posix_types.h:33:13 */
+type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc. Also, we cannot
+// assume GCC is being used.
+
+type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
+type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
+
+type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// There seems to be no way of detecting this automatically from user
+// space, so 64 bit architectures should override this in their
+// bitsperlong.h. In particular, an architecture that supports
+// both 32 and 64 bit user space must not rely on CONFIG_64BIT
+// to decide it, but rather check a compiler provided macro.
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc.
+//
+// First the types that are often defined in different ways across
+// architectures, so that you can override them.
+
+type X__kernel_long_t = int64 /* posix_types.h:15:15 */
+type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
+
+type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+
+type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
+
+type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
+
+type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
+
+type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
+type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
+
+type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+
+type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
+
+type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
+type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+
+// Most 32 bit architectures use "unsigned int" size_t,
+// and all 64 bit architectures use "unsigned long" size_t.
+type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
+type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+
+type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
+
+// anything below here should be completely generic
+type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
+type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// Socket-level I/O control calls.
+
+// For setsockopt(2)
+
+// Security levels - as per NRL IPv6 - don't actually do anything
+
+// Socket filtering
+
+// Instruct lower device to use last 4-bytes of skb data as FCS
+
+// on 64-bit and x32, avoid the ?: operator
+
+// Structure used to manipulate the SO_LINGER option.
+type Linger = struct {
+ Fl_onoff int32
+ Fl_linger int32
+} /* 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.
+type Osockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]uint8
+} /* struct_osockaddr.h:6:1 */
+
+// Define some macros helping to catch buffer overflows.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Internet address.
+type In_addr_t = Uint32_t /* in.h:30:18 */
+type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */
+
+// Get system-specific definitions.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Linux version.
+
+// If the application has already included linux/in6.h from a linux-based
+// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
+// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo
+// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly.
+// Neither the linux kernel nor glibc should break this ABI without coordination.
+// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check
+// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for
+// maximum backwards compatibility.
+
+// Options for use with `getsockopt' and `setsockopt' at the IP level.
+// The first word in the comment at the right is the data type used;
+// "bool" means a boolean value stored in an `int'.
+// For BSD compatibility.
+
+// TProxy original addresses
+
+// IP_MTU_DISCOVER arguments.
+// Always use interface mtu (ignores dst pmtu) but don't set DF flag.
+// Also incoming ICMP frag_needed notifications will be ignored on
+// this socket to prevent accepting spoofed ones.
+// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented.
+
+// 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).
+type Ip_opts = struct {
+ Fip_dst struct{ Fs_addr In_addr_t }
+ Fip_opts [40]int8
+} /* in.h:142:1 */
+
+// Like `struct ip_mreq' but including interface specification by index.
+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:149:1 */
+
+// Structure used for IP_PKTINFO.
+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:157:1 */
+
+// Type to represent a port.
+type In_port_t = Uint16_t /* in.h:119:18 */
+
+// Definitions of the bits in an Internet address integer.
+//
+// On subnets, host and network parts are found according to
+// the subnet mask, not these masks.
+
+// Address to accept any incoming messages.
+// Address to send to all hosts.
+// Address indicating an error return.
+
+// Network number for local host loopback.
+// Address to loopback in software to local host.
+
+// Defines for Multicast INADDR.
+
+// IPv6 address
+type In6_addr = struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+} /* in.h:212:1 */
+
+// ::1
+
+// Structure describing an Internet socket address.
+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
+} /* in.h:238:1 */
+
+// Ditto, for IPv6.
+type Sockaddr_in6 = struct {
+ Fsin6_family Sa_family_t
+ Fsin6_port In_port_t
+ Fsin6_flowinfo Uint32_t
+ Fsin6_addr struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+ }
+ Fsin6_scope_id Uint32_t
+} /* in.h:253:1 */
+
+// IPv4 multicast request.
+type Ip_mreq = struct {
+ Fimr_multiaddr struct{ Fs_addr In_addr_t }
+ Fimr_interface struct{ Fs_addr In_addr_t }
+} /* in.h:265: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:274:1 */
+
+// Likewise, for IPv6.
+type Ipv6_mreq = struct {
+ Fipv6mr_multiaddr struct {
+ F__in6_u struct {
+ F__ccgo_pad1 [0]uint32
+ F__u6_addr8 [16]Uint8_t
+ }
+ }
+ Fipv6mr_interface uint32
+} /* in.h:289:1 */
+
+// Multicast group request.
+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:301: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:310:1 */
+
+// Full-state filter operations.
+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:324: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:345:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/poll/capi_illumos_amd64.go b/vendor/modernc.org/libc/poll/capi_illumos_amd64.go
new file mode 100644
index 000000000..ee5e293c2
--- /dev/null
+++ b/vendor/modernc.org/libc/poll/capi_illumos_amd64.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_illumos_amd64.go -pkgname poll', DO NOT EDIT.
+
+package poll
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/poll/capi_linux_loong64.go b/vendor/modernc.org/libc/poll/capi_linux_loong64.go
index 52c3f3a23..b167e73c4 100644
--- a/vendor/modernc.org/libc/poll/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/poll/capi_linux_loong64.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 -ignore-unsupported-alignment -o poll/poll_linux_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_linux_loong64.go -pkgname poll', DO NOT EDIT.
package poll
diff --git a/vendor/modernc.org/libc/poll/capi_linux_mips64le.go b/vendor/modernc.org/libc/poll/capi_linux_mips64le.go
new file mode 100644
index 000000000..52c3f3a23
--- /dev/null
+++ b/vendor/modernc.org/libc/poll/capi_linux_mips64le.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_linux_amd64.go -pkgname poll', DO NOT EDIT.
+
+package poll
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/poll/poll_illumos_amd64.go b/vendor/modernc.org/libc/poll/poll_illumos_amd64.go
new file mode 100644
index 000000000..54a997246
--- /dev/null
+++ b/vendor/modernc.org/libc/poll/poll_illumos_amd64.go
@@ -0,0 +1,4081 @@
+// 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_illumos_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 (
+ BUS_ADRALN = 1 // machsig.h:109:1:
+ BUS_ADRERR = 2 // machsig.h:110:1:
+ BUS_OBJERR = 3 // machsig.h:112:1:
+ CLD_CONTINUED = 6 // siginfo.h:169:1:
+ CLD_DUMPED = 3 // siginfo.h:166:1:
+ CLD_EXITED = 1 // siginfo.h:164:1:
+ CLD_KILLED = 2 // siginfo.h:165:1:
+ CLD_STOPPED = 5 // siginfo.h:168:1:
+ CLD_TRAPPED = 4 // siginfo.h:167:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ EMT_CPCOVF = 1 // machsig.h:74:1:
+ FC_ALIGN = 0x2 // faultcode.h:54:1:
+ FC_HWERR = 0x1 // faultcode.h:53:1:
+ FC_NOMAP = 0x5 // faultcode.h:57:1:
+ FC_NOSUPPORT = 0x6 // faultcode.h:58:1:
+ FC_OBJERR = 0x3 // faultcode.h:55:1:
+ FC_PROT = 0x4 // faultcode.h:56:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FPE_FLTDEN = 9 // machsig.h:90:1:
+ FPE_FLTDIV = 3 // machsig.h:84:1:
+ FPE_FLTINV = 7 // machsig.h:88:1:
+ FPE_FLTOVF = 4 // machsig.h:85:1:
+ FPE_FLTRES = 6 // machsig.h:87:1:
+ FPE_FLTSUB = 8 // machsig.h:89:1:
+ FPE_FLTUND = 5 // machsig.h:86:1:
+ FPE_INTDIV = 1 // machsig.h:82:1:
+ FPE_INTOVF = 2 // machsig.h:83:1:
+ ILL_BADSTK = 8 // machsig.h:64:1:
+ ILL_COPROC = 7 // machsig.h:63:1:
+ ILL_ILLADR = 3 // machsig.h:59:1:
+ ILL_ILLOPC = 1 // machsig.h:57:1:
+ ILL_ILLOPN = 2 // machsig.h:58:1:
+ ILL_ILLTRP = 4 // machsig.h:60:1:
+ ILL_PRVOPC = 5 // machsig.h:61:1:
+ ILL_PRVREG = 6 // machsig.h:62:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MAXSIG = 74 // signal.h:163:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ MINSIGSTKSZ = 2048 // signal.h:166:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ NSIG = 75 // signal.h:162:1:
+ NSIGBUS = 3 // machsig.h:115:1:
+ NSIGCLD = 6 // siginfo.h:172:1:
+ NSIGEMT = 1 // machsig.h:75:1:
+ NSIGFPE = 9 // machsig.h:92:1:
+ NSIGILL = 8 // machsig.h:66:1:
+ NSIGPOLL = 6 // siginfo.h:187:1:
+ NSIGPROF = 1 // siginfo.h:198:1:
+ NSIGSEGV = 2 // machsig.h:102:1:
+ NSIGTRAP = 6 // siginfo.h:157:1:
+ POLLERR = 0x0008 // poll.h:74:1:
+ POLLET = 0x2000 // poll.h:84:1:
+ POLLHUP = 0x0010 // poll.h:75:1:
+ POLLIN = 0x0001 // poll.h:59:1:
+ POLLNORM = 64 // poll.h:68:1:
+ POLLNVAL = 0x0020 // poll.h:76:1:
+ POLLONESHOT = 0x1000 // poll.h:83:1:
+ POLLOUT = 0x0004 // poll.h:61:1:
+ POLLPRI = 0x0002 // poll.h:60:1:
+ POLLRDBAND = 0x0080 // poll.h:64:1:
+ POLLRDHUP = 0x4000 // poll.h:66:1:
+ POLLRDNORM = 0x0040 // poll.h:62:1:
+ POLLREMOVE = 0x0800 // poll.h:82:1:
+ POLLWRBAND = 0x0100 // poll.h:65:1:
+ POLLWRNORM = 4 // poll.h:63:1:
+ POLL_ERR = 4 // siginfo.h:182:1:
+ POLL_HUP = 6 // siginfo.h:184:1:
+ POLL_IN = 1 // siginfo.h:179:1:
+ POLL_MSG = 3 // siginfo.h:181:1:
+ POLL_OUT = 2 // siginfo.h:180:1:
+ POLL_PRI = 5 // siginfo.h:183:1:
+ PROF_SIG = 1 // siginfo.h:197:1:
+ P_INITPGID = 0 // procset.h:50:1:
+ P_INITPID = 1 // procset.h:48:1:
+ P_INITUID = 0 // procset.h:49:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SA_NOCLDSTOP = 0x00020000 // signal.h:128:1:
+ SA_NOCLDWAIT = 0x00010000 // signal.h:155:1:
+ SA_NODEFER = 0x00000010 // signal.h:152:1:
+ SA_ONSTACK = 0x00000001 // signal.h:138:1:
+ SA_RESETHAND = 0x00000002 // signal.h:139:1:
+ SA_RESTART = 0x00000004 // signal.h:140:1:
+ SA_SIGINFO = 0x00000008 // signal.h:146:1:
+ SEC = 1 // time.h:244:1:
+ SEGV_ACCERR = 2 // machsig.h:100:1:
+ SEGV_MAPERR = 1 // machsig.h:99:1:
+ SIG2STR_MAX = 32 // signal.h:95:1:
+ SIGABRT = 6 // signal_iso.h:58:1:
+ SIGALRM = 14 // signal_iso.h:66:1:
+ SIGBUS = 10 // signal_iso.h:62:1:
+ SIGCANCEL = 36 // signal_iso.h:90:1:
+ SIGCHLD = 18 // signal_iso.h:71:1:
+ SIGCLD = 18 // signal_iso.h:70:1:
+ SIGCONT = 25 // signal_iso.h:79:1:
+ SIGEMT = 7 // signal_iso.h:59:1:
+ SIGEV_NONE = 1 // siginfo.h:95:1:
+ SIGEV_PORT = 4 // siginfo.h:98:1:
+ SIGEV_SIGNAL = 2 // siginfo.h:96:1:
+ SIGEV_THREAD = 3 // siginfo.h:97:1:
+ SIGFPE = 8 // signal_iso.h:60:1:
+ SIGFREEZE = 34 // signal_iso.h:88:1:
+ SIGHUP = 1 // signal_iso.h:52:1:
+ SIGILL = 4 // signal_iso.h:55:1:
+ SIGINFO = 41 // signal_iso.h:95:1:
+ SIGINT = 2 // signal_iso.h:53:1:
+ SIGIO = 22 // signal_iso.h:76:1:
+ SIGIOT = 6 // signal_iso.h:57:1:
+ SIGJVM1 = 39 // signal_iso.h:93:1:
+ SIGJVM2 = 40 // signal_iso.h:94:1:
+ SIGKILL = 9 // signal_iso.h:61:1:
+ SIGLOST = 37 // signal_iso.h:91:1:
+ SIGLWP = 33 // signal_iso.h:87:1:
+ SIGPIPE = 13 // signal_iso.h:65:1:
+ SIGPOLL = 22 // signal_iso.h:75:1:
+ SIGPROF = 29 // signal_iso.h:83:1:
+ SIGPWR = 19 // signal_iso.h:72:1:
+ SIGQUIT = 3 // signal_iso.h:54:1:
+ SIGSEGV = 11 // signal_iso.h:63:1:
+ SIGSTKSZ = 8192 // signal.h:167:1:
+ SIGSTOP = 23 // signal_iso.h:77:1:
+ SIGSYS = 12 // signal_iso.h:64:1:
+ SIGTERM = 15 // signal_iso.h:67:1:
+ SIGTHAW = 35 // signal_iso.h:89:1:
+ SIGTRAP = 5 // signal_iso.h:56:1:
+ SIGTSTP = 24 // signal_iso.h:78:1:
+ SIGTTIN = 26 // signal_iso.h:80:1:
+ SIGTTOU = 27 // signal_iso.h:81:1:
+ SIGURG = 21 // signal_iso.h:74:1:
+ SIGUSR1 = 16 // signal_iso.h:68:1:
+ SIGUSR2 = 17 // signal_iso.h:69:1:
+ SIGVTALRM = 28 // signal_iso.h:82:1:
+ SIGWAITING = 32 // signal_iso.h:86:1:
+ SIGWINCH = 20 // signal_iso.h:73:1:
+ SIGXCPU = 30 // signal_iso.h:84:1:
+ SIGXFSZ = 31 // signal_iso.h:85:1:
+ SIGXRES = 38 // signal_iso.h:92:1:
+ SIG_BLOCK = 1 // signal_iso.h:131:1:
+ SIG_SETMASK = 3 // signal_iso.h:133:1:
+ SIG_UNBLOCK = 2 // signal_iso.h:132:1:
+ SI_ASYNCIO = -4 // siginfo.h:134:1:
+ SI_DTRACE = 2050 // siginfo.h:128:1:
+ SI_LWP = -1 // siginfo.h:131:1:
+ SI_MAXSZ = 256 // siginfo.h:206:1:
+ SI_MESGQ = -5 // siginfo.h:135:1:
+ SI_NOINFO = 32767 // siginfo.h:127:1:
+ SI_QUEUE = -2 // siginfo.h:132:1:
+ SI_RCTL = 2049 // siginfo.h:129:1:
+ SI_TIMER = -3 // siginfo.h:133:1:
+ SI_USER = 0 // siginfo.h:130:1:
+ SN_CANCEL = 2 // signal.h:226:1:
+ SN_PROC = 1 // signal.h:225:1:
+ SN_SEND = 3 // signal.h:227:1:
+ SS_DISABLE = 0x00000002 // signal.h:170:1:
+ SS_ONSTACK = 0x00000001 // signal.h:169:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TRAP_BRKPT = 1 // siginfo.h:150:1:
+ TRAP_DTRACE = 6 // siginfo.h:155:1:
+ TRAP_RWATCH = 3 // siginfo.h:152:1:
+ TRAP_TRACE = 2 // siginfo.h:151:1:
+ TRAP_WWATCH = 4 // siginfo.h:153:1:
+ TRAP_XWATCH = 5 // siginfo.h:154:1:
+ X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
+ X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
+ X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // time_iso.h:69:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
+ X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
+ X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
+ X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
+ X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
+ X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
+ X_CS_LFS_LIBS = 70 // unistd.h:58:1:
+ X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
+ X_CS_PATH = 65 // unistd.h:50:1:
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
+ X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
+ X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
+ X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_SIGNAL_ISO_H = 0 // signal_iso.h:46:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
+ X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
+ X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
+ X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
+ X_PC_ASYNC_IO = 10 // unistd.h:299:1:
+ X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
+ X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
+ X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
+ X_PC_LAST = 101 // unistd.h:336:1:
+ X_PC_LINK_MAX = 1 // unistd.h:289:1:
+ X_PC_MAX_CANON = 2 // unistd.h:290:1:
+ X_PC_MAX_INPUT = 3 // unistd.h:291:1:
+ X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
+ X_PC_NAME_MAX = 4 // unistd.h:292:1:
+ X_PC_NO_TRUNC = 7 // unistd.h:295:1:
+ X_PC_PATH_MAX = 5 // unistd.h:293:1:
+ X_PC_PIPE_BUF = 6 // unistd.h:294:1:
+ X_PC_PRIO_IO = 11 // unistd.h:300:1:
+ X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
+ X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
+ X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
+ X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
+ X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
+ X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
+ X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
+ X_PC_SYNC_IO = 12 // unistd.h:301:1:
+ X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
+ X_PC_VDISABLE = 8 // unistd.h:296:1:
+ X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
+ X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POLL_H = 0 // poll.h:31:1:
+ X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
+ X_POSIX2_C_BIND = 1 // unistd.h:401:1:
+ X_POSIX2_C_DEV = 1 // unistd.h:402:1:
+ X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
+ X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
+ X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
+ X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
+ X_POSIX2_UPE = 1 // unistd.h:406:1:
+ X_POSIX2_VERSION = 199209 // unistd.h:363:1:
+ X_POSIX_REGEXP = 1 // unistd.h:410:1:
+ X_POSIX_SHELL = 1 // unistd.h:411:1:
+ X_POSIX_VERSION = 199506 // unistd.h:355:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
+ X_SC_2_C_BIND = 45 // unistd.h:153:1:
+ X_SC_2_C_DEV = 46 // unistd.h:154:1:
+ X_SC_2_C_VERSION = 47 // unistd.h:155:1:
+ X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
+ X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
+ X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
+ X_SC_2_PBS = 724 // unistd.h:246:1:
+ X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
+ X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
+ X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
+ X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
+ X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
+ X_SC_2_SW_DEV = 51 // unistd.h:159:1:
+ X_SC_2_UPE = 52 // unistd.h:160:1:
+ X_SC_2_VERSION = 53 // unistd.h:161:1:
+ X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
+ X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
+ X_SC_AIO_MAX = 19 // unistd.h:126:1:
+ X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
+ X_SC_ARG_MAX = 1 // unistd.h:106:1:
+ X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
+ X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
+ X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
+ X_SC_BARRIERS = 732 // unistd.h:253:1:
+ X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
+ X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
+ X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
+ X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
+ X_SC_CHILD_MAX = 2 // unistd.h:107:1:
+ X_SC_CLK_TCK = 3 // unistd.h:108:1:
+ X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
+ X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
+ X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
+ X_SC_CPUID_MAX = 517 // unistd.h:211:1:
+ X_SC_CPUTIME = 734 // unistd.h:255:1:
+ X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
+ X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
+ X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
+ X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
+ X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
+ X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
+ X_SC_EPHID_MAX = 518 // unistd.h:212:1:
+ X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
+ X_SC_FSYNC = 23 // unistd.h:130:1:
+ X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
+ X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
+ X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
+ X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
+ X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
+ X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
+ X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
+ X_SC_IOV_MAX = 77 // unistd.h:180:1:
+ X_SC_IPV6 = 762 // unistd.h:283:1:
+ X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
+ X_SC_LINE_MAX = 60 // unistd.h:168:1:
+ X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
+ X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
+ X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
+ X_SC_MAXPID = 514 // unistd.h:208:1:
+ X_SC_MEMLOCK = 25 // unistd.h:132:1:
+ X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
+ X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
+ X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
+ X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
+ X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
+ X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
+ X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
+ X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
+ X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
+ X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
+ X_SC_OPEN_MAX = 5 // unistd.h:110:1:
+ X_SC_PAGESIZE = 11 // unistd.h:117:1:
+ X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
+ X_SC_PASS_MAX = 9 // unistd.h:115:1:
+ X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
+ X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
+ X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
+ X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
+ X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
+ X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
+ X_SC_REGEXP = 738 // unistd.h:259:1:
+ X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
+ X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
+ X_SC_SAVED_IDS = 7 // unistd.h:112:1:
+ X_SC_SEMAPHORES = 35 // unistd.h:142:1:
+ X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
+ X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
+ X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
+ X_SC_SHELL = 739 // unistd.h:260:1:
+ X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
+ X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
+ X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
+ X_SC_SPAWN = 740 // unistd.h:261:1:
+ X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
+ X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
+ X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
+ X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
+ X_SC_STACK_PROT = 515 // unistd.h:209:1:
+ X_SC_STREAM_MAX = 16 // unistd.h:122:1:
+ X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
+ X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
+ X_SC_THREADS = 576 // unistd.h:227:1:
+ X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
+ X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
+ X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
+ X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
+ X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
+ X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
+ X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
+ X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
+ X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
+ X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
+ X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
+ X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
+ X_SC_TIMEOUTS = 747 // unistd.h:268:1:
+ X_SC_TIMERS = 43 // unistd.h:150:1:
+ X_SC_TIMER_MAX = 44 // unistd.h:151:1:
+ X_SC_TRACE = 748 // unistd.h:269:1:
+ X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
+ X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
+ X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
+ X_SC_TRACE_LOG = 752 // unistd.h:273:1:
+ X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
+ X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
+ X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
+ X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
+ X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
+ X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
+ X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
+ X_SC_UADDR_MAX = 519 // unistd.h:213:1:
+ X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
+ X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
+ X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
+ X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
+ X_SC_VERSION = 8 // unistd.h:113:1:
+ X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
+ X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
+ X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
+ X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
+ X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
+ X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
+ X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
+ X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
+ X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
+ X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
+ X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
+ X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
+ X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
+ X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGNAL_H = 0 // signal.h:33:1:
+ X_SIGRTMAX = 74 // signal_iso.h:99:1:
+ X_SIGRTMIN = 42 // signal_iso.h:98:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // time_iso.h:60:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STACK_T = 0 // signal.h:174:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHSIG_H = 0 // machsig.h:32:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_POLL_H = 0 // poll.h:38:1:
+ X_SYS_PROCSET_H = 0 // procset.h:32:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_SIGINFO_H = 0 // siginfo.h:31:1:
+ X_SYS_SIGNAL_H = 0 // signal.h:42:1:
+ X_SYS_SIGNAL_ISO_H = 0 // signal_iso.h:44:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UNISTD_H = 0 // unistd.h:40:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // time_iso.h:74:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_VM_FAULTCODE_H = 0 // faultcode.h:40:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
+ X_XOPEN_REALTIME = 1 // unistd.h:388:1:
+ X_XOPEN_SHM = 1 // unistd.h:390:1:
+ X_XOPEN_STREAMS = 1 // unistd.h:412:1:
+ X_XOPEN_UNIX = 0 // unistd.h:382:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
+ X_XOPEN_XPG3 = 0 // unistd.h:380:1:
+ X_XOPEN_XPG4 = 0 // unistd.h:381:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file defines the data needed to specify a set of
+// processes. These types are used by the sigsend, sigsendset,
+// priocntl, priocntlset, waitid, evexit, and evexitset system
+// calls.
+
+// The following defines the values for an identifier type. It
+// specifies the interpretation of an id value. An idtype and
+// id together define a simple set of processes.
+const ( /* procset.h:58:1: */
+ P_PID = 0 // A process identifier.
+ P_PPID = 1 // A parent process identifier.
+ P_PGID = 2 // A process group (job control group)
+ // identifier.
+ P_SID = 3 // A session identifier.
+ P_CID = 4 // A scheduling class identifier.
+ P_UID = 5 // A user identifier.
+ P_GID = 6 // A group identifier.
+ P_ALL = 7 // All processes.
+ P_LWPID = 8 // An LWP 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
+)
+
+// The following defines the operations which can be performed to
+// combine two simple sets of processes to form another set of
+// processes.
+const ( /* procset.h:89:1: */
+ POP_DIFF = 0 // Set difference. The processes which
+ // are in the left operand set and not
+ // in the right operand set.
+ POP_AND = 1 // Set disjunction. The processes
+ // which are in both the left and right
+ // operand sets.
+ POP_OR = 2 // Set conjunction. The processes
+ // which are in either the left or the
+ // right operand sets (or both).
+ POP_XOR = 3
+) // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Poll system call interface definitions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd = struct {
+ Ffd int32
+ Fevents int16
+ Frevents int16
+} /* poll.h:48:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Poll system call interface definitions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd_t = Pollfd /* poll.h:52:3 */
+
+type Nfds_t = uint64 /* poll.h:54:23 */ // size of something in bytes
+
+type Clock_t = int64 /* time_iso.h:70:14 */
+
+type Time_t = int64 /* time_iso.h:75: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
+} /* time_iso.h:80:1 */
+
+// C11 requires sys/time_impl.h for the definition of the struct timespec.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// C11 requires sys/time_impl.h for the definition of the struct timespec.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // process id type
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */ // System Private interface to sysconf()
+
+type Sig_atomic_t = int32 /* signal_iso.h:58:13 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <sys/signal.h.h>.
+
+// We need <sys/siginfo.h> for the declaration of siginfo_t.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// The union sigval is also defined in <time.h> as per X/Open and
+// POSIX requirements.
+
+// The sigevent structure is also defined in <time.h> as per X/Open and
+// POSIX requirements.
+
+// values of sigev_notify
+
+// negative signal codes are reserved for future use for user generated
+// signals
+
+// Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
+// SIGBUS) from <sys/machsig.h>
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// machsig.h is the machine dependent portion of siginfo.h (and is
+// included by siginfo.h). A version of machsig.h should exist for
+// each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
+// are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
+// SIGPOLL are architecture independent and may be found in siginfo.h.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file describes the data type returned by vm routines
+// which handle faults.
+//
+// If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
+// returned by the underlying object mapped at the fault address.
+
+type Faultcode_t = int32 /* faultcode.h:66:13 */
+
+// SIGILL signal codes
+
+// SIGEMT signal codes
+
+// SIGFPE signal codes
+
+// SIGSEGV signal codes
+
+// SIGBUS signal codes
+
+// SIGTRAP signal codes
+
+// SIGCLD signal codes
+
+// SIGPOLL signal codes
+
+// SIGPROF signal codes
+
+// Inclusion of <sys/time_impl.h> is needed for the declaration of
+// timestruc_t. However, since inclusion of <sys/time_impl.h> results
+// in X/Open and POSIX namespace pollution, the definition for
+// timestruct_t has been duplicated in a standards namespace safe header
+// <sys/time_std_impl.h>. In <sys/time_std_impl.h>, the structure
+// name, tag, and member names, as well as the type itself, all have
+// leading underscores to protect namespace.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
+// Placement here is due to a dependency in <sys/select.h> which is included
+// by <sys/types.h> for the sigevent structure. Hence this inclusion must
+// follow that definition.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+type Siginfo = struct {
+ Fsi_signo int32
+ Fsi_code int32
+ Fsi_errno int32
+ Fsi_pad int32
+ F__data struct {
+ F__ccgo_pad1 [0]uint64
+ F__pad [60]int32
+ }
+} /* siginfo.h:237:9 */
+
+// SIGILL signal codes
+
+// SIGEMT signal codes
+
+// SIGFPE signal codes
+
+// SIGSEGV signal codes
+
+// SIGBUS signal codes
+
+// SIGTRAP signal codes
+
+// SIGCLD signal codes
+
+// SIGPOLL signal codes
+
+// SIGPROF signal codes
+
+// Inclusion of <sys/time_impl.h> is needed for the declaration of
+// timestruc_t. However, since inclusion of <sys/time_impl.h> results
+// in X/Open and POSIX namespace pollution, the definition for
+// timestruct_t has been duplicated in a standards namespace safe header
+// <sys/time_std_impl.h>. In <sys/time_std_impl.h>, the structure
+// name, tag, and member names, as well as the type itself, all have
+// leading underscores to protect namespace.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
+// Placement here is due to a dependency in <sys/select.h> which is included
+// by <sys/types.h> for the sigevent structure. Hence this inclusion must
+// follow that definition.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+type Siginfo_t = Siginfo /* siginfo.h:304:3 */
+
+// XXX -- internal version is identical to siginfo_t but without the padding.
+// This must be maintained in sync with it.
+
+type K_siginfo = struct {
+ Fsi_signo int32
+ Fsi_code int32
+ Fsi_errno int32
+ Fsi_pad int32
+ F__data struct {
+ F__proc struct {
+ F__pid int32
+ F__ccgo_pad1 [4]byte
+ F__pdata struct {
+ F__kill struct {
+ F__uid uint32
+ F__ccgo_pad1 [4]byte
+ F__value struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+ }
+ }
+ F__ccgo_pad1 [8]byte
+ }
+ F__ctid int32
+ F__zoneid int32
+ }
+ }
+} /* siginfo.h:379:9 */
+
+// XXX -- internal version is identical to siginfo_t but without the padding.
+// This must be maintained in sync with it.
+
+type K_siginfo_t = K_siginfo /* siginfo.h:438:3 */
+
+type Sigqueue = struct {
+ Fsq_next uintptr
+ Fsq_info K_siginfo_t
+ Fsq_func uintptr
+ Fsq_backptr uintptr
+ Fsq_external int32
+ F__ccgo_pad1 [4]byte
+} /* siginfo.h:440:9 */
+
+type Sigqueue_t = Sigqueue /* siginfo.h:447:3 */
+
+// indication whether to queue the signal or not
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements
+
+type K_sigset_t = struct{ F__sigbits [3]uint32 } /* signal.h:73:3 */
+
+// The signal handler routine can have either one or three arguments.
+// Existing C code has used either form so not specifing the arguments
+// neatly finesses the problem. C++ doesn't accept this. To C++
+// "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
+// specify this as "(*sa_handler)(void)"). One or the other form must be
+// used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
+// the SIG_* defines to work. "(*sa_sigaction)(int, siginfo_t *, void *)"
+// can be used for the three argument form.
+
+// Note: storage overlap by sa_handler and sa_sigaction
+type Sigaction = struct {
+ Fsa_flags int32
+ F__ccgo_pad1 [4]byte
+ F_funcptr struct{ F_handler uintptr }
+ Fsa_mask Sigset_t
+} /* signal.h:89:1 */
+
+// this is only valid for SIGCLD
+
+// non-conformant ANSI compilation
+
+// definitions for the sa_flags field
+
+// this is only valid for SIGCLD
+
+// use of these symbols by applications is injurious
+// to binary compatibility
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements.
+type Sigaltstack = struct {
+ Fss_sp uintptr
+ Fss_size uint64
+ Fss_flags int32
+ F__ccgo_pad1 [4]byte
+} /* signal.h:176:9 */
+
+// this is only valid for SIGCLD
+
+// non-conformant ANSI compilation
+
+// definitions for the sa_flags field
+
+// this is only valid for SIGCLD
+
+// use of these symbols by applications is injurious
+// to binary compatibility
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements.
+type Stack_t = Sigaltstack /* signal.h:183:3 */
+
+// signotify id used only by libc for mq_notify()/aio_notify()
+type Signotify_id = struct {
+ Fsn_pid int32
+ Fsn_index int32
+ Fsn_pad int32
+} /* signal.h:205:9 */
+
+// signotify id used only by libc for mq_notify()/aio_notify()
+type Signotify_id_t = Signotify_id /* signal.h:209:3 */
+
+// Command codes for sig_notify call
+
+// Added as per XPG4v2
+type Sigstack = struct {
+ Fss_sp uintptr
+ Fss_onstack int32
+ F__ccgo_pad1 [4]byte
+} /* signal.h:235:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file defines the data needed to specify a set of
+// processes. These types are used by the sigsend, sigsendset,
+// priocntl, priocntlset, waitid, evexit, and evexitset system
+// calls.
+
+// The following defines the values for an identifier type. It
+// specifies the interpretation of an id value. An idtype and
+// id together define a simple set of processes.
+type Idtype_t = uint32 /* procset.h:80:3 */
+
+// The following defines the operations which can be performed to
+// combine two simple sets of processes to form another set of
+// processes.
+type Idop_t = uint32 /* procset.h:102:3 */
+
+// The following structure is used to define a set of processes.
+// The set is defined in terms of two simple sets of processes
+// and an operator which operates on these two operand sets.
+type Procset = struct {
+ Fp_op uint32
+ Fp_lidtype uint32
+ Fp_lid int32
+ Fp_ridtype uint32
+ Fp_rid int32
+} /* procset.h:110:9 */
+
+// The following structure is used to define a set of processes.
+// The set is defined in terms of two simple sets of processes
+// and an operator which operates on these two operand sets.
+type Procset_t = Procset /* procset.h:125:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/poll/poll_linux_loong64.go b/vendor/modernc.org/libc/poll/poll_linux_loong64.go
index 83aca0f21..e88473d05 100644
--- a/vendor/modernc.org/libc/poll/poll_linux_loong64.go
+++ b/vendor/modernc.org/libc/poll/poll_linux_loong64.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 -ignore-unsupported-alignment -o poll/poll_linux_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_linux_loong64.go -pkgname poll', DO NOT EDIT.
package poll
@@ -15,28 +15,39 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- POLLERR = 0x008 // poll.h:47:1:
- POLLHUP = 0x010 // poll.h:48:1:
- POLLIN = 0x001 // poll.h:25:1:
- POLLNVAL = 0x020 // poll.h:49:1:
- POLLOUT = 0x004 // poll.h:27:1:
- POLLPRI = 0x002 // poll.h:26:1:
- POLLRDBAND = 0x080 // poll.h:32:1:
- POLLRDNORM = 0x040 // poll.h:31:1:
- POLLWRBAND = 0x200 // poll.h:34:1:
- POLLWRNORM = 0x100 // poll.h:33:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_POLL_H = 1 // poll.h:20:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ POLLERR = 0x008 // poll.h:47:1:
+ POLLHUP = 0x010 // poll.h:48:1:
+ POLLIN = 0x001 // poll.h:25:1:
+ POLLNVAL = 0x020 // poll.h:49:1:
+ POLLOUT = 0x004 // poll.h:27:1:
+ POLLPRI = 0x002 // poll.h:26:1:
+ POLLRDBAND = 0x080 // poll.h:32:1:
+ POLLRDNORM = 0x040 // poll.h:31:1:
+ POLLWRBAND = 0x200 // poll.h:34:1:
+ POLLWRNORM = 0x100 // poll.h:33:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_POLL_H = 1 // poll.h:20:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -58,7 +69,7 @@ type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Compatibility definitions for System V `poll' interface.
-// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// Copyright (C) 1994-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -75,7 +86,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -107,6 +118,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -122,12 +135,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -168,6 +184,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -238,6 +256,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -256,9 +330,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -286,7 +366,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -307,23 +388,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -336,6 +418,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -356,8 +440,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -367,6 +451,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -395,8 +482,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -427,11 +519,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -441,11 +536,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -479,6 +590,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -492,13 +619,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// Get the platform dependent bits of `poll'.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
diff --git a/vendor/modernc.org/libc/poll/poll_linux_mips64le.go b/vendor/modernc.org/libc/poll/poll_linux_mips64le.go
new file mode 100644
index 000000000..83aca0f21
--- /dev/null
+++ b/vendor/modernc.org/libc/poll/poll_linux_mips64le.go
@@ -0,0 +1,540 @@
+// 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_linux_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 (
+ POLLERR = 0x008 // poll.h:47:1:
+ POLLHUP = 0x010 // poll.h:48:1:
+ POLLIN = 0x001 // poll.h:25:1:
+ POLLNVAL = 0x020 // poll.h:49:1:
+ POLLOUT = 0x004 // poll.h:27:1:
+ POLLPRI = 0x002 // poll.h:26:1:
+ POLLRDBAND = 0x080 // poll.h:32:1:
+ POLLRDNORM = 0x040 // poll.h:31:1:
+ POLLWRBAND = 0x200 // poll.h:34:1:
+ POLLWRNORM = 0x100 // poll.h:33:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_POLL_H = 1 // poll.h:20:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Compatibility definitions for System V `poll' interface.
+// Copyright (C) 1994-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// Get the platform dependent bits of `poll'.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Event types that can be polled for. These bits may be set in `events'
+// to indicate the interesting event types; they will appear in `revents'
+// to indicate the status of the file descriptor.
+
+// These values are defined in XPG4.2.
+
+// Event types always implicitly polled for. These bits need not be set in
+// `events', but they will appear in `revents' to indicate the status of
+// the file descriptor.
+
+// Type used for the number of file descriptors.
+type Nfds_t = uint64 /* poll.h:33:27 */
+
+// Data structure describing a polling request.
+type Pollfd = struct {
+ Ffd int32
+ Fevents int16
+ Frevents int16
+} /* poll.h:36:1 */
+
+// Define some inlines helping to catch common problems.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/printf.go b/vendor/modernc.org/libc/printf.go
index d6de15d5d..be9242a46 100644
--- a/vendor/modernc.org/libc/printf.go
+++ b/vendor/modernc.org/libc/printf.go
@@ -38,17 +38,17 @@ const (
// the output stream; and conversion specifications, each of which results in
// fetching zero or more subsequent arguments.
func printf(format, args uintptr) []byte {
- format0 := format
- args0 := args
+ // format0 := format
+ // args0 := args
buf := bytes.NewBuffer(nil)
for {
switch c := *(*byte)(unsafe.Pointer(format)); c {
case '%':
format = printfConversion(buf, format, &args)
case 0:
- if dmesgs {
- dmesg("%v: %q, %#x -> %q", origin(1), GoString(format0), args0, buf.Bytes())
- }
+ // if dmesgs {
+ // dmesg("%v: %q, %#x -> %q", origin(1), GoString(format0), args0, buf.Bytes())
+ // }
return buf.Bytes()
default:
format++
@@ -114,7 +114,7 @@ flags:
break flags
}
}
- format, width, hasWidth := parseFieldWidth(format)
+ format, width, hasWidth := parseFieldWidth(format, args)
if hasWidth {
spec += strconv.Itoa(width)
}
@@ -239,6 +239,38 @@ more:
f := spec + "o"
str = fmt.Sprintf(f, arg)
+ case 'b':
+ // Base 2.
+ format++
+ var arg uint64
+ if isWindows && mod == modL {
+ mod = modNone
+ }
+ switch mod {
+ case modNone:
+ arg = uint64(VaUint32(args))
+ case modL, modLL, mod64:
+ arg = VaUint64(args)
+ case modH:
+ arg = uint64(uint16(VaInt32(args)))
+ case modHH:
+ arg = uint64(uint8(VaInt32(args)))
+ case mod32:
+ arg = uint64(VaInt32(args))
+ default:
+ panic(todo("", mod))
+ }
+
+ if arg == 0 && hasPrecision && prec == 0 {
+ break
+ }
+
+ if hasPrecision {
+ panic(todo("", prec))
+ }
+
+ f := spec + "b"
+ str = fmt.Sprintf(f, arg)
case 'I':
if !isWindows {
panic(todo("%#U", c))
@@ -474,7 +506,7 @@ more:
// nonexistent or small field width cause truncation of a field; if the result
// of a conversion is wider than the field width, the field is expanded to
// contain the conversion result.
-func parseFieldWidth(format uintptr) (_ uintptr, n int, ok bool) {
+func parseFieldWidth(format uintptr, args *uintptr) (_ uintptr, n int, ok bool) {
first := true
for {
var digit int
@@ -482,7 +514,13 @@ func parseFieldWidth(format uintptr) (_ uintptr, n int, ok bool) {
case first && c == '0':
return format, n, ok
case first && c == '*':
- panic(todo(""))
+ format++
+ switch c := *(*byte)(unsafe.Pointer(format)); {
+ case c >= '0' && c <= '9':
+ panic(todo(""))
+ default:
+ return format, int(VaInt32(args)), true
+ }
case c >= '0' && c <= '9':
format++
ok = true
diff --git a/vendor/modernc.org/libc/pthread.go b/vendor/modernc.org/libc/pthread.go
index 528b83f9c..f47156a80 100644
--- a/vendor/modernc.org/libc/pthread.go
+++ b/vendor/modernc.org/libc/pthread.go
@@ -83,10 +83,16 @@ func (t *TLS) FreeAlloca() func() {
}
func Xalloca(tls *TLS, size size_t) uintptr {
+ if __ccgo_strace {
+ trc("tls=%v size=%v, (%v:)", tls, size, origin(2))
+ }
return tls.alloca(size)
}
func X__builtin_alloca(tls *TLS, size size_t) uintptr {
+ if __ccgo_strace {
+ trc("tls=%v size=%v, (%v:)", tls, size, origin(2))
+ }
return Xalloca(tls, size)
}
@@ -126,11 +132,17 @@ func (d *pthreadData) close(t *TLS) {
// int pthread_attr_destroy(pthread_attr_t *attr);
func Xpthread_attr_destroy(t *TLS, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
return 0
}
// int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
func Xpthread_attr_setscope(t *TLS, pAttr uintptr, contentionScope int32) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v contentionScope=%v, (%v:)", t, pAttr, contentionScope, origin(2))
+ }
switch contentionScope {
case pthread.PTHREAD_SCOPE_SYSTEM:
return 0
@@ -141,6 +153,9 @@ func Xpthread_attr_setscope(t *TLS, pAttr uintptr, contentionScope int32) int32
// int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
func Xpthread_attr_setstacksize(t *TLS, attr uintptr, stackSize types.Size_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v attr=%v stackSize=%v, (%v:)", t, attr, stackSize, origin(2))
+ }
panic(todo(""))
}
@@ -190,6 +205,9 @@ func (c *cond) signal(all bool) int32 {
//
// int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr);
func Xpthread_cond_init(t *TLS, pCond, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
if pCond == 0 {
return errno.EINVAL
}
@@ -208,6 +226,9 @@ func Xpthread_cond_init(t *TLS, pCond, pAttr uintptr) int32 {
// int pthread_cond_destroy(pthread_cond_t *cond);
func Xpthread_cond_destroy(t *TLS, pCond uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
+ }
if pCond == 0 {
return errno.EINVAL
}
@@ -235,11 +256,17 @@ func Xpthread_cond_destroy(t *TLS, pCond uintptr) int32 {
// int pthread_cond_signal(pthread_cond_t *cond);
func Xpthread_cond_signal(t *TLS, pCond uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
+ }
return condSignal(pCond, false)
}
// int pthread_cond_broadcast(pthread_cond_t *cond);
func Xpthread_cond_broadcast(t *TLS, pCond uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pCond=%v, (%v:)", t, pCond, origin(2))
+ }
return condSignal(pCond, true)
}
@@ -257,6 +284,9 @@ func condSignal(pCond uintptr, all bool) int32 {
// int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex);
func Xpthread_cond_wait(t *TLS, pCond, pMutex uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
+ }
if pCond == 0 {
return errno.EINVAL
}
@@ -286,6 +316,9 @@ func Xpthread_cond_wait(t *TLS, pCond, pMutex uintptr) int32 {
// int pthread_cond_timedwait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime);
func Xpthread_cond_timedwait(t *TLS, pCond, pMutex, pAbsTime uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAbsTime=%v, (%v:)", t, pAbsTime, origin(2))
+ }
if pCond == 0 {
return errno.EINVAL
}
@@ -457,6 +490,9 @@ func (m *mutex) unlock() int32 {
// int pthread_mutex_destroy(pthread_mutex_t *mutex);
func Xpthread_mutex_destroy(t *TLS, pMutex uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
+ }
mutexesMu.Lock()
defer mutexesMu.Unlock()
@@ -467,6 +503,9 @@ func Xpthread_mutex_destroy(t *TLS, pMutex uintptr) int32 {
// int pthread_mutex_lock(pthread_mutex_t *mutex);
func Xpthread_mutex_lock(t *TLS, pMutex uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
+ }
mutexesMu.Lock()
mu := mutexes[pMutex]
if mu == nil { // static initialized mutexes are valid
@@ -479,6 +518,9 @@ func Xpthread_mutex_lock(t *TLS, pMutex uintptr) int32 {
// int pthread_mutex_trylock(pthread_mutex_t *mutex);
func Xpthread_mutex_trylock(t *TLS, pMutex uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
+ }
mutexesMu.Lock()
mu := mutexes[pMutex]
if mu == nil { // static initialized mutexes are valid
@@ -491,6 +533,9 @@ func Xpthread_mutex_trylock(t *TLS, pMutex uintptr) int32 {
// int pthread_mutex_unlock(pthread_mutex_t *mutex);
func Xpthread_mutex_unlock(t *TLS, pMutex uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pMutex=%v, (%v:)", t, pMutex, origin(2))
+ }
mutexesMu.Lock()
defer mutexesMu.Unlock()
@@ -515,6 +560,9 @@ func Xpthread_key_create(t *TLS, pKey, destructor uintptr) int32 {
// int pthread_key_delete(pthread_key_t key);
func Xpthread_key_delete(t *TLS, key pthread.Pthread_key_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v key=%v, (%v:)", t, key, origin(2))
+ }
if _, ok := t.kv[key]; ok {
delete(t.kv, key)
return 0
@@ -526,11 +574,17 @@ func Xpthread_key_delete(t *TLS, key pthread.Pthread_key_t) int32 {
// void *pthread_getspecific(pthread_key_t key);
func Xpthread_getspecific(t *TLS, key pthread.Pthread_key_t) uintptr {
+ if __ccgo_strace {
+ trc("t=%v key=%v, (%v:)", t, key, origin(2))
+ }
return t.kv[key]
}
// int pthread_setspecific(pthread_key_t key, const void *value);
func Xpthread_setspecific(t *TLS, key pthread.Pthread_key_t, value uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v key=%v value=%v, (%v:)", t, key, value, origin(2))
+ }
if t.kv == nil {
t.kv = map[pthread.Pthread_key_t]uintptr{}
}
@@ -540,6 +594,9 @@ func Xpthread_setspecific(t *TLS, key pthread.Pthread_key_t, value uintptr) int3
// int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);
func Xpthread_create(t *TLS, pThread, pAttr, startRoutine, arg uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v arg=%v, (%v:)", t, arg, origin(2))
+ }
fn := (*struct {
f func(*TLS, uintptr) uintptr
})(unsafe.Pointer(&struct{ uintptr }{startRoutine})).f
@@ -556,6 +613,9 @@ func Xpthread_create(t *TLS, pThread, pAttr, startRoutine, arg uintptr) int32 {
// int pthread_detach(pthread_t thread);
func Xpthread_detach(t *TLS, thread pthread.Pthread_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v thread=%v, (%v:)", t, thread, origin(2))
+ }
threadsMu.Lock()
threads[int32(thread)].detached = true
threadsMu.Unlock()
@@ -564,11 +624,17 @@ func Xpthread_detach(t *TLS, thread pthread.Pthread_t) int32 {
// int pthread_equal(pthread_t t1, pthread_t t2);
func Xpthread_equal(t *TLS, t1, t2 pthread.Pthread_t) int32 {
+ if __ccgo_strace {
+ trc("t=%v t2=%v, (%v:)", t, t2, origin(2))
+ }
return Bool32(t1 == t2)
}
// void pthread_exit(void *value_ptr);
func Xpthread_exit(t *TLS, value uintptr) {
+ if __ccgo_strace {
+ trc("t=%v value=%v, (%v:)", t, value, origin(2))
+ }
t.retVal = value
// At thread exit, if a key value has a non-NULL destructor pointer, and the
@@ -605,6 +671,9 @@ func Xpthread_exit(t *TLS, value uintptr) {
// int pthread_join(pthread_t thread, void **value_ptr);
func Xpthread_join(t *TLS, thread pthread.Pthread_t, pValue uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v thread=%v pValue=%v, (%v:)", t, thread, pValue, origin(2))
+ }
threadsMu.Lock()
tls := threads[int32(thread)]
delete(threads, int32(thread))
@@ -618,5 +687,8 @@ func Xpthread_join(t *TLS, thread pthread.Pthread_t, pValue uintptr) int32 {
// pthread_t pthread_self(void);
func Xpthread_self(t *TLS) pthread.Pthread_t {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
return pthread.Pthread_t(t.ID)
}
diff --git a/vendor/modernc.org/libc/pthread/capi_illumos_amd64.go b/vendor/modernc.org/libc/pthread/capi_illumos_amd64.go
new file mode 100644
index 000000000..d647cda9c
--- /dev/null
+++ b/vendor/modernc.org/libc/pthread/capi_illumos_amd64.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_illumos_amd64.go -pkgname pthread', DO NOT EDIT.
+
+package pthread
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/pthread/capi_linux_loong64.go b/vendor/modernc.org/libc/pthread/capi_linux_loong64.go
index fd760fda4..04f76e09e 100644
--- a/vendor/modernc.org/libc/pthread/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/pthread/capi_linux_loong64.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 -ignore-unsupported-alignment -o pthread/pthread_linux_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_linux_loong64.go -pkgname pthread', DO NOT EDIT.
package pthread
diff --git a/vendor/modernc.org/libc/pthread/capi_linux_mips64le.go b/vendor/modernc.org/libc/pthread/capi_linux_mips64le.go
new file mode 100644
index 000000000..fd760fda4
--- /dev/null
+++ b/vendor/modernc.org/libc/pthread/capi_linux_mips64le.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_linux_amd64.go -pkgname pthread', DO NOT EDIT.
+
+package pthread
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go b/vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go
new file mode 100644
index 000000000..b4d06e30d
--- /dev/null
+++ b/vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go
@@ -0,0 +1,3059 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ PTHREAD_BARRIER_SERIAL_THREAD = -2 // pthread.h:149:1:
+ PTHREAD_CANCEL_ASYNCHRONOUS = 0x02 // pthread.h:133:1:
+ PTHREAD_CANCEL_DEFERRED = 0x00 // pthread.h:132:1:
+ PTHREAD_CANCEL_DISABLE = 0x01 // pthread.h:131:1:
+ PTHREAD_CANCEL_ENABLE = 0x00 // pthread.h:130:1:
+ PTHREAD_CREATE_DETACHED = 0x40 // pthread.h:52:1:
+ PTHREAD_CREATE_JOINABLE = 0 // pthread.h:53:1:
+ PTHREAD_EXPLICIT_SCHED = 0 // pthread.h:63:1:
+ PTHREAD_INHERIT_SCHED = 1 // pthread.h:62:1:
+ PTHREAD_MAX_NAMELEN_NP = 32 // pthread.h:152:1:
+ PTHREAD_MUTEX_DEFAULT = 0 // pthread.h:80:1:
+ PTHREAD_MUTEX_ERRORCHECK = 0x2 // pthread.h:78:1:
+ PTHREAD_MUTEX_NORMAL = 0x0 // pthread.h:77:1:
+ PTHREAD_MUTEX_RECURSIVE = 0x4 // pthread.h:79:1:
+ PTHREAD_MUTEX_ROBUST = 0x40 // pthread.h:94:1:
+ PTHREAD_MUTEX_ROBUST_NP = 64 // pthread.h:100:1:
+ PTHREAD_MUTEX_STALLED = 0x0 // pthread.h:93:1:
+ PTHREAD_MUTEX_STALL_NP = 0 // pthread.h:99:1:
+ PTHREAD_ONCE_DONE = 1 // pthread.h:138:1:
+ PTHREAD_ONCE_NOTDONE = 0 // pthread.h:137:1:
+ PTHREAD_PRIO_INHERIT = 0x10 // pthread.h:86:1:
+ PTHREAD_PRIO_NONE = 0x0 // pthread.h:85:1:
+ PTHREAD_PRIO_PROTECT = 0x20 // pthread.h:87:1:
+ PTHREAD_PROCESS_PRIVATE = 0 // pthread.h:71:1:
+ PTHREAD_PROCESS_SHARED = 1 // pthread.h:70:1:
+ PTHREAD_SCOPE_PROCESS = 0 // pthread.h:56:1:
+ PTHREAD_SCOPE_SYSTEM = 0x01 // pthread.h:55:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SCHED_FIFO = 1 // sched.h:48:1:
+ SCHED_FSS = 5 // sched.h:52:1:
+ SCHED_FX = 6 // sched.h:53:1:
+ SCHED_IA = 4 // sched.h:51:1:
+ SCHED_OTHER = 0 // sched.h:47:1:
+ SCHED_RR = 2 // sched.h:49:1:
+ SCHED_SYS = 3 // sched.h:50:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTHREAD_H = 0 // pthread.h:32:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SCHED_H = 0 // sched.h:30:1:
+ X_SCHED_NEXT = 7 // sched.h:54:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2018 Joyent, Inc.
+// Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2018 Joyent, Inc.
+// Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+type Sched_param = struct {
+ Fsched_priority int32
+ Fsched_pad [8]int32
+} /* sched.h:39:1 */
+
+// Thread related attribute values defined as in thread.h.
+// These are defined as bit pattern in thread.h.
+// Any change here should be reflected in thread.h.
+// detach
+// scope
+
+// Other attributes which are not defined in thread.h
+// inherit
+
+// Value of process-shared attribute
+// These are defined as values defined in sys/synch.h
+// Any change here should be reflected in sys/synch.h.
+
+// mutex types
+// keep these in synch which sys/synch.h lock flags
+
+// Mutex protocol values. Keep these in synch with sys/synch.h lock types.
+
+// Mutex robust attribute values.
+// Keep these in synch with sys/synch.h lock types.
+// Historical solaris-specific names,
+// from before pthread_mutexattr_getrobust() became standardized
+
+// macros - default initializers defined as in synch.h
+// Any change here should be reflected in synch.h.
+//
+// NOTE:
+// Make sure that any change in the macros is consistent with the definition
+// of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
+// should be consistent with the definition for pthread_mutex_t).
+
+// cancellation type and state
+
+// pthread_once related values
+
+// The key to be created by pthread_key_create_once_np()
+// must be statically initialized with PTHREAD_ONCE_KEY_NP.
+// This must be the same as THR_ONCE_KEY in <thread.h>
+
+// barriers
+
+// For pthread_{get,set}name_np().
+
+// cancellation cleanup structure
+type X_cleanup = struct{ Fpthread_cleanup_pad [4]uint64 } /* pthread.h:159:9 */
+
+// Thread related attribute values defined as in thread.h.
+// These are defined as bit pattern in thread.h.
+// Any change here should be reflected in thread.h.
+// detach
+// scope
+
+// Other attributes which are not defined in thread.h
+// inherit
+
+// Value of process-shared attribute
+// These are defined as values defined in sys/synch.h
+// Any change here should be reflected in sys/synch.h.
+
+// mutex types
+// keep these in synch which sys/synch.h lock flags
+
+// Mutex protocol values. Keep these in synch with sys/synch.h lock types.
+
+// Mutex robust attribute values.
+// Keep these in synch with sys/synch.h lock types.
+// Historical solaris-specific names,
+// from before pthread_mutexattr_getrobust() became standardized
+
+// macros - default initializers defined as in synch.h
+// Any change here should be reflected in synch.h.
+//
+// NOTE:
+// Make sure that any change in the macros is consistent with the definition
+// of the corresponding types in sys/types.h (e.g. PTHREAD_MUTEX_INITIALIZER
+// should be consistent with the definition for pthread_mutex_t).
+
+// cancellation type and state
+
+// pthread_once related values
+
+// The key to be created by pthread_key_create_once_np()
+// must be statically initialized with PTHREAD_ONCE_KEY_NP.
+// This must be the same as THR_ONCE_KEY in <thread.h>
+
+// barriers
+
+// For pthread_{get,set}name_np().
+
+// cancellation cleanup structure
+type X_cleanup_t = X_cleanup /* pthread.h:161:3 */
+
+type X_Voidfp = uintptr /* pthread.h:171:14 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go b/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go
index c7762fdd0..27a161651 100644
--- a/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go
+++ b/vendor/modernc.org/libc/pthread/pthread_linux_loong64.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 -ignore-unsupported-alignment -o pthread/pthread_linux_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_linux_loong64.go -pkgname pthread', DO NOT EDIT.
package pthread
@@ -15,72 +15,84 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- CLOCK_BOOTTIME = 7 // time.h:60:1:
- CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
- CLOCK_MONOTONIC = 1 // time.h:48:1:
- CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
- CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
- CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
- CLOCK_REALTIME = 0 // time.h:46:1:
- CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
- CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
- CLOCK_TAI = 11 // time.h:66:1:
- CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
- PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:189:1:
- PTHREAD_ONCE_INIT = 0 // pthread.h:182:1:
- SCHED_FIFO = 1 // sched.h:29:1:
- SCHED_OTHER = 0 // sched.h:28:1:
- SCHED_RR = 2 // sched.h:30:1:
- TIMER_ABSTIME = 1 // time.h:69:1:
- TIME_UTC = 1 // time.h:65:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_CPU_SET_H = 1 // cpu-set.h:21:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_SCHED_H = 1 // sched.h:21:1:
- X_BITS_SETJMP_H = 1 // setjmp.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TIME_H = 1 // time.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
- X_BITS_TYPES_STRUCT_SCHED_PARAM = 1 // struct_sched_param.h:20:1:
- X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_PTHREAD_H = 1 // pthread.h:19:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SCHED_H = 1 // sched.h:20:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_TIME_H = 1 // time.h:23:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ CLOCK_BOOTTIME = 7 // time.h:60:1:
+ CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
+ CLOCK_MONOTONIC = 1 // time.h:48:1:
+ CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
+ CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
+ CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
+ CLOCK_REALTIME = 0 // time.h:46:1:
+ CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
+ CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
+ CLOCK_TAI = 11 // time.h:66:1:
+ CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
+ PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:193:1:
+ PTHREAD_ONCE_INIT = 0 // pthread.h:186:1:
+ PTHREAD_STACK_MIN = 131072 // pthread_stack_min.h:20:1:
+ SCHED_FIFO = 1 // sched.h:29:1:
+ SCHED_OTHER = 0 // sched.h:28:1:
+ SCHED_RR = 2 // sched.h:30:1:
+ TIMER_ABSTIME = 1 // time.h:69:1:
+ TIME_UTC = 1 // time.h:65:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_CPU_SET_H = 1 // cpu-set.h:21:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SCHED_H = 1 // sched.h:21:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TIME_H = 1 // time.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES_STRUCT_SCHED_PARAM = 1 // struct_sched_param.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:20:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_BITS_SETJMP_H = 0 // setjmp.h:20:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_PTHREAD_H = 1 // pthread.h:19:1:
+ X_SCHED_H = 1 // sched.h:20:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_TIME_H = 1 // time.h:23:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Read-write lock types.
-const ( /* pthread.h:100:1: */
+const ( /* pthread.h:104:1: */
PTHREAD_RWLOCK_PREFER_READER_NP = 0
PTHREAD_RWLOCK_PREFER_WRITER_NP = 1
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2
@@ -90,46 +102,79 @@ const ( /* pthread.h:100:1: */
// Read-write lock initializers.
// Scheduler inheritance.
-const ( /* pthread.h:120:1: */
+const ( /* pthread.h:124:1: */
PTHREAD_INHERIT_SCHED = 0
PTHREAD_EXPLICIT_SCHED = 1
)
// Scope handling.
-const ( /* pthread.h:130:1: */
+const ( /* pthread.h:134:1: */
PTHREAD_SCOPE_SYSTEM = 0
PTHREAD_SCOPE_PROCESS = 1
)
// Process shared or private flag.
-const ( /* pthread.h:140:1: */
+const ( /* pthread.h:144:1: */
PTHREAD_PROCESS_PRIVATE = 0
PTHREAD_PROCESS_SHARED = 1
)
// Cancellation
-const ( /* pthread.h:164:1: */
+const ( /* pthread.h:168:1: */
PTHREAD_CANCEL_ENABLE = 0
PTHREAD_CANCEL_DISABLE = 1
)
-const ( /* pthread.h:171:1: */
+const ( /* pthread.h:175:1: */
PTHREAD_CANCEL_DEFERRED = 0
PTHREAD_CANCEL_ASYNCHRONOUS = 1
)
-// Determine the wordsize from the preprocessor defines.
+// Definition of PTHREAD_STACK_MIN, possibly dynamic.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// NB: Include guard matches what <linux/time.h> uses.
+// Definition of PTHREAD_STACK_MIN. LoongArch Linux version.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 2.1 of the
+// License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+// Minimum size for a thread. At least two pages with 64k pages.
// Detach state.
-const ( /* pthread.h:33:1: */
+const ( /* pthread.h:37:1: */
PTHREAD_CREATE_JOINABLE = 0
PTHREAD_CREATE_DETACHED = 1
)
// Mutex types.
-const ( /* pthread.h:43:1: */
+const ( /* pthread.h:47:1: */
PTHREAD_MUTEX_TIMED_NP = 0
PTHREAD_MUTEX_RECURSIVE_NP = 1
PTHREAD_MUTEX_ERRORCHECK_NP = 2
@@ -141,7 +186,7 @@ const ( /* pthread.h:43:1: */
)
// Robust mutex or not flags.
-const ( /* pthread.h:65:1: */
+const ( /* pthread.h:69:1: */
PTHREAD_MUTEX_STALLED = 0
PTHREAD_MUTEX_STALLED_NP = 0
PTHREAD_MUTEX_ROBUST = 1
@@ -149,7 +194,7 @@ const ( /* pthread.h:65:1: */
)
// Mutex protocols.
-const ( /* pthread.h:77:1: */
+const ( /* pthread.h:81:1: */
PTHREAD_PRIO_NONE = 0
PTHREAD_PRIO_INHERIT = 1
PTHREAD_PRIO_PROTECT = 2
@@ -173,7 +218,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -190,7 +235,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -222,6 +267,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -237,12 +284,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -283,6 +333,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -353,6 +405,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -371,9 +479,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -401,7 +515,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -422,23 +537,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -451,6 +567,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -471,8 +589,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -482,6 +600,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -510,8 +631,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -542,11 +668,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -556,11 +685,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -594,6 +739,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -607,13 +768,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -630,7 +808,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -649,7 +827,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get type definitions.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -668,7 +846,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -685,11 +863,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -706,7 +898,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -725,14 +917,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -772,8 +964,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -787,14 +979,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -805,10 +995,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -835,7 +1027,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -847,60 +1039,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215:13 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -913,7 +1106,7 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// A null pointer constant.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -933,12 +1126,12 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -958,7 +1151,7 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -985,7 +1178,7 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
@@ -994,16 +1187,16 @@ type Time_t = X__time_t /* time_t.h:7:18 */
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Pid_t = X__pid_t /* sched.h:38:17 */
+type Pid_t = int32 /* sched.h:38:17 */
// Get system specific constant and data structure definitions.
// Definitions of constants and data structure for POSIX 1003.1b-1993
// scheduling interface.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1023,7 +1216,7 @@ type Pid_t = X__pid_t /* sched.h:38:17 */
// Scheduling algorithms.
// Sched parameter structure. Generic version.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1045,7 +1238,7 @@ type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1
// Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
// scheduling interface.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1070,9 +1263,9 @@ type X__cpu_mask = uint64 /* cpu-set.h:32:25 */
// Basic access functions.
// Data structure to describe CPU mask.
-type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
+type Cpu_set_t = struct{ F__bits [16]uint64 } /* cpu-set.h:42:3 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1091,7 +1284,7 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// ISO C99 Standard: 7.23 Date and time <time.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1108,7 +1301,7 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1179,7 +1372,7 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// This defines CLOCKS_PER_SEC, which is the number of processor clock
// ticks per second, and possibly a number of other constants.
// System-dependent timing definitions. Linux version.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1199,7 +1392,7 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// Never include this file directly; use <time.h> instead.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1243,7 +1436,7 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// may also need to be defined by other headers.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1263,10 +1456,10 @@ type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1304,7 +1497,7 @@ type Tm = struct {
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1324,10 +1517,10 @@ type Tm = struct {
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1347,10 +1540,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1374,17 +1567,17 @@ type Timer_t = X__timer_t /* timer_t.h:7:19 */
// POSIX.1b structure for timer start values and intervals.
type Itimerspec = struct {
Fit_interval struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fit_value struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
} /* struct_itimerspec.h:8:1 */
// Definition of locale_t.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1402,9 +1595,8 @@ type Itimerspec = struct {
// <https://www.gnu.org/licenses/>.
// Definition of struct __locale_struct and __locale_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
-// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -1431,14 +1623,14 @@ type X__locale_struct = struct {
F__ctype_tolower uintptr
F__ctype_toupper uintptr
F__names [13]uintptr
-} /* __locale_t.h:28:1 */
+} /* __locale_t.h:27:1 */
-type X__locale_t = uintptr /* __locale_t.h:42:32 */
+type X__locale_t = uintptr /* __locale_t.h:41:32 */
-type Locale_t = X__locale_t /* locale_t.h:24:20 */
+type Locale_t = uintptr /* locale_t.h:24:20 */
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1456,7 +1648,7 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
// <http://www.gnu.org/licenses/>.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1475,7 +1667,7 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1514,36 +1706,9 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1560,8 +1725,7 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1578,9 +1742,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1597,56 +1760,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -1662,8 +1795,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1680,16 +1813,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -1702,9 +1839,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1721,6 +1875,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -1728,26 +1887,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -1790,7 +1952,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -1813,7 +1979,54 @@ type Pthread_barrierattr_t = struct {
F__size [4]int8
} /* pthreadtypes.h:118:3 */
-// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// Define the machine-dependent type `jmp_buf'.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+type X__jmp_buf_internal_tag = struct {
+ F__pc int64
+ F__sp int64
+ F__x int64
+ F__fp int64
+ F__regs [9]int64
+ F__fpregs [8]float64
+} /* setjmp.h:22:9 */
+
+// Define the machine-dependent type `jmp_buf'.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+type X__jmp_buf = [1]X__jmp_buf_internal_tag /* setjmp.h:40:3 */
+
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1830,13 +2043,53 @@ type Pthread_barrierattr_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Define the machine-dependent type `jmp_buf'. x86-64 version.
+// NB: Include guard matches what <linux/time.h> uses.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
-// Determine the wordsize from the preprocessor defines.
+// Define struct __jmp_buf_tag.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
+// Define the machine-dependent type `jmp_buf'.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
-type X__jmp_buf = [8]int64 /* setjmp.h:31:18 */
+// Calling environment, plus possibly a saved signal mask.
+type X__jmp_buf_tag = struct {
+ F__jmpbuf X__jmp_buf
+ F__mask_was_saved int32
+ F__ccgo_pad1 [4]byte
+ F__saved_mask X__sigset_t
+} /* struct___jmp_buf_tag.h:26:1 */
// Conditional variable handling.
@@ -1847,18 +2100,20 @@ type X_pthread_cleanup_buffer = struct {
F__canceltype int32
F__ccgo_pad1 [4]byte
F__prev uintptr
-} /* pthread.h:155:1 */
+} /* pthread.h:159:1 */
// Cancellation handling with integration into exception handling.
+type X__cancel_jmp_buf_tag = struct {
+ F__cancel_jmp_buf X__jmp_buf
+ F__mask_was_saved int32
+ F__ccgo_pad1 [4]byte
+} /* pthread.h:538:1 */
+
type X__pthread_unwind_buf_t = struct {
- F__cancel_jmp_buf [1]struct {
- F__cancel_jmp_buf X__jmp_buf
- F__mask_was_saved int32
- F__ccgo_pad1 [4]byte
- }
- F__pad [4]uintptr
-} /* pthread.h:507:3 */
+ F__cancel_jmp_buf [1]X__cancel_jmp_buf_tag
+ F__pad [4]uintptr
+} /* pthread.h:548:3 */
// No special attributes by default.
@@ -1868,6 +2123,6 @@ type X__pthread_cleanup_frame = struct {
F__cancel_arg uintptr
F__do_it int32
F__cancel_type int32
-} /* pthread.h:516:1 */
+} /* pthread.h:557:1 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_mips64le.go b/vendor/modernc.org/libc/pthread/pthread_linux_mips64le.go
new file mode 100644
index 000000000..c7762fdd0
--- /dev/null
+++ b/vendor/modernc.org/libc/pthread/pthread_linux_mips64le.go
@@ -0,0 +1,1873 @@
+// 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_linux_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 (
+ CLOCK_BOOTTIME = 7 // time.h:60:1:
+ CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
+ CLOCK_MONOTONIC = 1 // time.h:48:1:
+ CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
+ CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
+ CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
+ CLOCK_REALTIME = 0 // time.h:46:1:
+ CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
+ CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
+ CLOCK_TAI = 11 // time.h:66:1:
+ CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
+ PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:189:1:
+ PTHREAD_ONCE_INIT = 0 // pthread.h:182:1:
+ SCHED_FIFO = 1 // sched.h:29:1:
+ SCHED_OTHER = 0 // sched.h:28:1:
+ SCHED_RR = 2 // sched.h:30:1:
+ TIMER_ABSTIME = 1 // time.h:69:1:
+ TIME_UTC = 1 // time.h:65:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_CPU_SET_H = 1 // cpu-set.h:21:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SCHED_H = 1 // sched.h:21:1:
+ X_BITS_SETJMP_H = 1 // setjmp.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TIME_H = 1 // time.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES_STRUCT_SCHED_PARAM = 1 // struct_sched_param.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_PTHREAD_H = 1 // pthread.h:19:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SCHED_H = 1 // sched.h:20:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_TIME_H = 1 // time.h:23:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Read-write lock types.
+const ( /* pthread.h:100:1: */
+ PTHREAD_RWLOCK_PREFER_READER_NP = 0
+ PTHREAD_RWLOCK_PREFER_WRITER_NP = 1
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2
+ PTHREAD_RWLOCK_DEFAULT_NP = 0
+)
+
+// Read-write lock initializers.
+
+// Scheduler inheritance.
+const ( /* pthread.h:120:1: */
+ PTHREAD_INHERIT_SCHED = 0
+ PTHREAD_EXPLICIT_SCHED = 1
+)
+
+// Scope handling.
+const ( /* pthread.h:130:1: */
+ PTHREAD_SCOPE_SYSTEM = 0
+ PTHREAD_SCOPE_PROCESS = 1
+)
+
+// Process shared or private flag.
+const ( /* pthread.h:140:1: */
+ PTHREAD_PROCESS_PRIVATE = 0
+ PTHREAD_PROCESS_SHARED = 1
+)
+
+// Cancellation
+const ( /* pthread.h:164:1: */
+ PTHREAD_CANCEL_ENABLE = 0
+ PTHREAD_CANCEL_DISABLE = 1
+)
+const ( /* pthread.h:171:1: */
+ PTHREAD_CANCEL_DEFERRED = 0
+ PTHREAD_CANCEL_ASYNCHRONOUS = 1
+)
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// NB: Include guard matches what <linux/time.h> uses.
+
+// Detach state.
+const ( /* pthread.h:33:1: */
+ PTHREAD_CREATE_JOINABLE = 0
+ PTHREAD_CREATE_DETACHED = 1
+)
+
+// Mutex types.
+const ( /* pthread.h:43:1: */
+ PTHREAD_MUTEX_TIMED_NP = 0
+ PTHREAD_MUTEX_RECURSIVE_NP = 1
+ PTHREAD_MUTEX_ERRORCHECK_NP = 2
+ PTHREAD_MUTEX_ADAPTIVE_NP = 3
+ PTHREAD_MUTEX_NORMAL = 0
+ PTHREAD_MUTEX_RECURSIVE = 1
+ PTHREAD_MUTEX_ERRORCHECK = 2
+ PTHREAD_MUTEX_DEFAULT = 0
+)
+
+// Robust mutex or not flags.
+const ( /* pthread.h:65:1: */
+ PTHREAD_MUTEX_STALLED = 0
+ PTHREAD_MUTEX_STALLED_NP = 0
+ PTHREAD_MUTEX_ROBUST = 1
+ PTHREAD_MUTEX_ROBUST_NP = 1
+)
+
+// Mutex protocols.
+const ( /* pthread.h:77:1: */
+ PTHREAD_PRIO_NONE = 0
+ PTHREAD_PRIO_INHERIT = 1
+ PTHREAD_PRIO_PROTECT = 2
+)
+
+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 */
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get type definitions.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+type X__sig_atomic_t = int32 /* types.h:214:13 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Pid_t = X__pid_t /* sched.h:38:17 */
+
+// Get system specific constant and data structure definitions.
+// Definitions of constants and data structure for POSIX 1003.1b-1993
+// scheduling interface.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Scheduling algorithms.
+
+// Sched parameter structure. Generic version.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Data structure to describe a process' schedulability.
+type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1 */
+
+// Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
+// scheduling interface.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size definition for CPU sets.
+
+// Type for array elements in 'cpu_set_t'.
+type X__cpu_mask = uint64 /* cpu-set.h:32:25 */
+
+// Basic access functions.
+
+// Data structure to describe CPU mask.
+type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.23 Date and time <time.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This defines CLOCKS_PER_SEC, which is the number of processor clock
+// ticks per second, and possibly a number of other constants.
+// System-dependent timing definitions. Linux version.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <time.h> instead.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// ISO/IEC 9899:1999 7.23.1: Components of time
+// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+// the number per second of the value returned by the `clock' function.
+// CAE XSH, Issue 4, Version 2: <time.h>
+// The value of CLOCKS_PER_SEC is required to be 1 million on all
+// XSI-conformant systems.
+
+// Identifier for system-wide realtime clock.
+// Monotonic system-wide clock.
+// High-resolution timer from the CPU.
+// Thread-specific CPU-time clock.
+// Monotonic system-wide clock, not adjusted for frequency scaling.
+// Identifier for system-wide realtime clock, updated only on ticks.
+// Monotonic system-wide clock, updated only on ticks.
+// Monotonic system-wide clock that includes time spent in suspension.
+// Like CLOCK_REALTIME but also wakes suspended system.
+// Like CLOCK_BOOTTIME but also wakes suspended system.
+// Like CLOCK_REALTIME but in International Atomic Time.
+
+// Flag to indicate time is absolute.
+
+// Many of the typedefs and structs whose official home is this header
+// may also need to be defined by other headers.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// ISO C `broken-down time' structure.
+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
+} /* struct_tm.h:7:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// POSIX.1b structure for timer start values and intervals.
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fit_value struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+} /* struct_itimerspec.h:8:1 */
+
+// Definition of locale_t.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of struct __locale_struct and __locale_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX.1-2008: the locale_t type, representing a locale context
+// (implementation-namespace version). This type should be treated
+// as opaque by applications; some details are exposed for the sake of
+// efficiency in e.g. ctype functions.
+
+type X__locale_struct = struct {
+ F__locales [13]uintptr
+ F__ctype_b uintptr
+ F__ctype_tolower uintptr
+ F__ctype_toupper uintptr
+ F__names [13]uintptr
+} /* __locale_t.h:28:1 */
+
+type X__locale_t = uintptr /* __locale_t.h:42:32 */
+
+type Locale_t = X__locale_t /* locale_t.h:24:20 */
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define the machine-dependent type `jmp_buf'. x86-64 version.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+type X__jmp_buf = [8]int64 /* setjmp.h:31:18 */
+
+// Conditional variable handling.
+
+// Cleanup buffers
+type X_pthread_cleanup_buffer = struct {
+ F__routine uintptr
+ F__arg uintptr
+ F__canceltype int32
+ F__ccgo_pad1 [4]byte
+ F__prev uintptr
+} /* pthread.h:155:1 */
+
+// Cancellation handling with integration into exception handling.
+
+type X__pthread_unwind_buf_t = struct {
+ F__cancel_jmp_buf [1]struct {
+ F__cancel_jmp_buf X__jmp_buf
+ F__mask_was_saved int32
+ F__ccgo_pad1 [4]byte
+ }
+ F__pad [4]uintptr
+} /* pthread.h:507:3 */
+
+// No special attributes by default.
+
+// Structure to hold the cleanup handler information.
+type X__pthread_cleanup_frame = struct {
+ F__cancel_routine uintptr
+ F__cancel_arg uintptr
+ F__do_it int32
+ F__cancel_type int32
+} /* pthread.h:516:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/pthread_all.go b/vendor/modernc.org/libc/pthread_all.go
index 4e2b7f105..2b23b585f 100644
--- a/vendor/modernc.org/libc/pthread_all.go
+++ b/vendor/modernc.org/libc/pthread_all.go
@@ -15,6 +15,9 @@ import (
// int pthread_attr_init(pthread_attr_t *attr);
func Xpthread_attr_init(t *TLS, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
*(*pthread.Pthread_attr_t)(unsafe.Pointer(pAttr)) = pthread.Pthread_attr_t{}
return 0
}
@@ -31,6 +34,9 @@ func Xpthread_attr_init(t *TLS, pAttr uintptr) int32 {
//
// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr);
func Xpthread_mutex_init(t *TLS, pMutex, pAttr uintptr) int32 {
+ if __ccgo_strace {
+ trc("t=%v pAttr=%v, (%v:)", t, pAttr, origin(2))
+ }
typ := pthread.PTHREAD_MUTEX_DEFAULT
if pAttr != 0 {
typ = int(X__ccgo_pthreadMutexattrGettype(t, pAttr))
diff --git a/vendor/modernc.org/libc/pwd/capi_illumos_amd64.go b/vendor/modernc.org/libc/pwd/capi_illumos_amd64.go
new file mode 100644
index 000000000..ee09f8bcd
--- /dev/null
+++ b/vendor/modernc.org/libc/pwd/capi_illumos_amd64.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_illumos_amd64.go -pkgname pwd', DO NOT EDIT.
+
+package pwd
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/pwd/capi_linux_loong64.go b/vendor/modernc.org/libc/pwd/capi_linux_loong64.go
index 2a479f585..9029ab8bc 100644
--- a/vendor/modernc.org/libc/pwd/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/pwd/capi_linux_loong64.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 -ignore-unsupported-alignment -o pwd/pwd_linux_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_linux_loong64.go -pkgname pwd', DO NOT EDIT.
package pwd
diff --git a/vendor/modernc.org/libc/pwd/capi_linux_mips64le.go b/vendor/modernc.org/libc/pwd/capi_linux_mips64le.go
new file mode 100644
index 000000000..2a479f585
--- /dev/null
+++ b/vendor/modernc.org/libc/pwd/capi_linux_mips64le.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_linux_amd64.go -pkgname pwd', DO NOT EDIT.
+
+package pwd
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go b/vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go
new file mode 100644
index 000000000..d67affe34
--- /dev/null
+++ b/vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go
@@ -0,0 +1,3188 @@
+// 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_illumos_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 (
+ BUFSIZ = 1024 // stdio_iso.h:124:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ EOF = -1 // stdio_iso.h:152:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FILENAME_MAX = 1024 // stdio_iso.h:156:1:
+ FOPEN_MAX = 20 // stdio_iso.h:155:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ L_ctermid = 9 // stdio.h:207:1:
+ L_cuserid = 9 // stdio.h:211:1:
+ L_tmpnam = 25 // stdio_iso.h:163:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ P_tmpdir = "/var/tmp/" // stdio.h:220:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ SEEK_CUR = 1 // stdio_iso.h:159:1:
+ SEEK_END = 2 // stdio_iso.h:160:1:
+ SEEK_SET = 0 // stdio_iso.h:158:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TMP_MAX = 17576 // stdio_iso.h:161:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILEDEFED = 0 // stdio_iso.h:101:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IOEOF = 0020 // stdio_iso.h:143:1:
+ X_IOERR = 0040 // stdio_iso.h:144:1:
+ X_IOFBF = 0000 // stdio_iso.h:140:1:
+ X_IOLBF = 0100 // stdio_iso.h:141:1:
+ X_IOMYBUF = 0010 // stdio_iso.h:149:1:
+ X_IONBF = 0004 // stdio_iso.h:142:1:
+ X_IOREAD = 0001 // stdio_iso.h:146:1:
+ X_IORW = 0200 // stdio_iso.h:148:1:
+ X_IOWRT = 0002 // stdio_iso.h:147:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_STDIO_C99_H = 0 // stdio_c99.h:41:1:
+ X_ISO_STDIO_ISO_H = 0 // stdio_iso.h:59:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NFILE = 20 // stdio_iso.h:135:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_PWD_H = 0 // pwd.h:34:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SBFSIZ = 8 // stdio_iso.h:138:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_STDIO_H = 0 // stdio.h:44:1:
+ X_STDIO_IMPL_H = 0 // stdio_impl.h:28:1:
+ X_STDIO_TAG_H = 0 // stdio_tag.h:28:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_VA_LIST_H = 0 // va_list.h:34:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/stdio.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Do all of our 'redefine_extname' processing before
+// declarations of the associated functions are seen.
+// This is necessary to keep gcc happy.
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/iso/stdio_iso.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <stdio.h>.
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The purpose of this header is to provide the type definitions for
+// the va_list argument used by a number of printf and printf like
+// functions. The headers that define these various function prototypes
+// #include this header directly. These include but are not necessarily
+// limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
+// <syslog.h>. The type definitions included in this header are for
+// the benefit of consumers of va_list.
+//
+// Any application that accepts variable argument lists must as documented,
+// include either <varargs.h> or the preferred <stdarg.h>. Doing so will
+// pull in the appropriate compiler protocols defined in <sys/va_impl.h>
+// which is in turn is included by <varargs.h> and <stdarg.h>. See comments
+// in <sys/va_impl.h> for more detailed information regarding implementation
+// and compiler specific protocols.
+
+// The common definitions exported by this header or compilers using
+// this header are:
+//
+// the identifier __builtin_va_alist for the variable list pseudo parameter
+// the type __va_alist_type for the variable list pseudo parameter
+// the type __va_list defining the type of the variable list iterator
+//
+// The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
+// (__GNUC__) and processor macros (e.g. __amd64) are intended to be
+// defined by the compilation system, not the user of the system.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__gnuc_va_list = uintptr /* va_list.h:108:27 */
+// XX64 This seems unnecessary .. but is needed because vcmn_err is
+//
+// defined with __va_list instead of plain old va_list.
+// Perhaps that should be fixed!
+type X__va_list = uintptr /* va_list.h:114:27 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE1 = struct{ F__pad [16]int64 } /* stdio_tag.h:40:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE = X__FILE1 /* stdio_tag.h:40:27 */
+
+// If feature test macros are set that enable interfaces that use types
+// defined in <sys/types.h>, get those types by doing the include.
+//
+// Note that in asking for the interfaces associated with this feature test
+// macro one also asks for definitions of the POSIX types.
+
+type FILE = X__FILE /* stdio_iso.h:102:16 */
+
+type Fpos_t = int64 /* stdio_iso.h:115:15 */
+
+type Fpos64_t = int64 /* stdio.h:188:17 */
+
+type Passwd = struct {
+ Fpw_name uintptr
+ Fpw_passwd uintptr
+ Fpw_uid uint32
+ Fpw_gid uint32
+ Fpw_age uintptr
+ Fpw_comment uintptr
+ Fpw_gecos uintptr
+ Fpw_dir uintptr
+ Fpw_shell uintptr
+} /* pwd.h:48:1 */
+
+type Comment = struct {
+ Fc_dept uintptr
+ Fc_name uintptr
+ Fc_acct uintptr
+ Fc_bin uintptr
+} /* pwd.h:61:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go b/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go
index 922d6ef33..2ad54c6f9 100644
--- a/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go
+++ b/vendor/modernc.org/libc/pwd/pwd_linux_loong64.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 -ignore-unsupported-alignment -o pwd/pwd_linux_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_linux_loong64.go -pkgname pwd', DO NOT EDIT.
package pwd
@@ -15,34 +15,45 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- NSS_BUFLEN_PASSWD = 1024 // pwd.h:123:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_PWD_H = 1 // pwd.h:23:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ NSS_BUFLEN_PASSWD = 1024 // pwd.h:123:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_PWD_H = 1 // pwd.h:23:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -63,7 +74,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -82,7 +93,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 9.2.2 User Database Access <pwd.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -114,6 +125,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -129,12 +142,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -175,6 +191,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -245,6 +263,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -263,9 +337,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -293,7 +373,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -314,23 +395,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -343,6 +425,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -363,8 +447,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -374,6 +458,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -402,8 +489,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -434,11 +526,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -448,11 +543,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -486,6 +597,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -499,13 +626,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -524,7 +668,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -541,11 +685,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -562,7 +720,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -581,14 +739,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -628,8 +786,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -643,14 +801,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -661,10 +817,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -691,7 +849,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -703,60 +861,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215:13 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -771,16 +930,16 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// The Single Unix specification says that some more types are
//
// available here.
-type Gid_t = X__gid_t /* pwd.h:38:17 */
+type Gid_t = uint32 /* pwd.h:38:17 */
-type Uid_t = X__uid_t /* pwd.h:43:17 */
+type Uid_t = uint32 /* pwd.h:43:17 */
// A record in the user database.
type Passwd = struct {
Fpw_name uintptr
Fpw_passwd uintptr
- Fpw_uid X__uid_t
- Fpw_gid X__gid_t
+ Fpw_uid uint32
+ Fpw_gid uint32
Fpw_gecos uintptr
Fpw_dir uintptr
Fpw_shell uintptr
diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_mips64le.go b/vendor/modernc.org/libc/pwd/pwd_linux_mips64le.go
new file mode 100644
index 000000000..922d6ef33
--- /dev/null
+++ b/vendor/modernc.org/libc/pwd/pwd_linux_mips64le.go
@@ -0,0 +1,789 @@
+// 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_linux_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 (
+ NSS_BUFLEN_PASSWD = 1024 // pwd.h:123:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_PWD_H = 1 // pwd.h:23:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 9.2.2 User Database Access <pwd.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+type X__sig_atomic_t = int32 /* types.h:214:13 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// The Single Unix specification says that some more types are
+//
+// available here.
+type Gid_t = X__gid_t /* pwd.h:38:17 */
+
+type Uid_t = X__uid_t /* pwd.h:43:17 */
+
+// A record in the user database.
+type Passwd = struct {
+ Fpw_name uintptr
+ Fpw_passwd uintptr
+ Fpw_uid X__uid_t
+ Fpw_gid X__gid_t
+ Fpw_gecos uintptr
+ Fpw_dir uintptr
+ Fpw_shell uintptr
+} /* pwd.h:49:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/scanf.go b/vendor/modernc.org/libc/scanf.go
index ead0830e8..cc35da358 100644
--- a/vendor/modernc.org/libc/scanf.go
+++ b/vendor/modernc.org/libc/scanf.go
@@ -5,7 +5,8 @@
package libc // import "modernc.org/libc"
import (
- "strings"
+ "io"
+ "strconv"
"unsafe"
)
@@ -15,7 +16,7 @@ import (
// be either of the following: input failure, meaning that input characters
// were unavailable, or matching failure, meaning that the input was
// inappropriate.
-func scanf(r *strings.Reader, format, args uintptr) (nvalues int32) {
+func scanf(r io.ByteScanner, format, args uintptr) (nvalues int32) {
// var src []byte //TODO-
var ok bool
out:
@@ -75,7 +76,7 @@ out:
return -1 // stdio.EOF but not defined for windows
}
-func scanfConversion(r *strings.Reader, format uintptr, args *uintptr) (_ uintptr, nvalues int, match bool) {
+func scanfConversion(r io.ByteScanner, format uintptr, args *uintptr) (_ uintptr, nvalues int, match bool) {
format++ // '%'
// Each conversion specification in format begins with either the character '%'
@@ -157,7 +158,7 @@ flags:
break dec
}
- panic(todo("", err))
+ return 0, 0, false
}
if allowSign {
@@ -301,7 +302,38 @@ flags:
// Matches an optionally signed floating-point number; the next pointer must be
// a pointer to float.
format++
- panic(todo(""))
+ skipReaderWhiteSpace(r)
+ seq := fpLiteral(r)
+ if len(seq) == 0 {
+ return 0, 0, false
+ }
+
+ var neg bool
+ switch seq[0] {
+ case '+':
+ seq = seq[1:]
+ case '-':
+ neg = true
+ seq = seq[1:]
+ }
+ n, err := strconv.ParseFloat(string(seq), 64)
+ if err != nil {
+ panic(todo("", err))
+ }
+
+ arg := VaUintptr(args)
+ if neg {
+ n = -n
+ }
+ switch mod {
+ case modNone:
+ *(*float32)(unsafe.Pointer(arg)) = float32(n)
+ case modL:
+ *(*float64)(unsafe.Pointer(arg)) = n
+ default:
+ panic(todo("", mod, neg, n))
+ }
+ return format, 1, true
case 's':
// Matches a sequence of non-white-space characters; the next pointer must be
// a pointer to the initial element of a character array that is long enough to
@@ -414,7 +446,7 @@ flags:
return format, nvalues, match
}
-func skipReaderWhiteSpace(r *strings.Reader) error {
+func skipReaderWhiteSpace(r io.ByteScanner) error {
for {
c, err := r.ReadByte()
if err != nil {
@@ -441,3 +473,157 @@ func skipWhiteSpace(s uintptr) uintptr {
}
}
}
+
+// [-+]?([0-9]*[.])?[0-9]+([eE][-+]?\d+)?
+func fpLiteral(rd io.ByteScanner) (seq []byte) {
+ const endOfText = 0x110000
+ var pos, width, length int
+
+ defer func() {
+ if len(seq) > length {
+ rd.UnreadByte()
+ seq = seq[:len(seq)-1]
+ }
+ }()
+
+ var r rune
+ step := func(pos int) (rune, int) {
+ b, err := rd.ReadByte()
+ if err != nil {
+ return endOfText, 0
+ }
+
+ seq = append(seq, b)
+ return rune(b), 1
+ }
+ move := func() {
+ pos += width
+ if r != endOfText {
+ r, width = step(pos + width)
+ }
+ }
+ accept := func(x rune) bool {
+ if r == x {
+ move()
+ return true
+ }
+ return false
+ }
+ accept2 := func(x rune) bool {
+ if r <= x {
+ move()
+ return true
+ }
+ return false
+ }
+ r = endOfText
+ width = 0
+ r, width = step(pos)
+ if accept('.') {
+ goto l7
+ }
+ if accept('+') {
+ goto l30
+ }
+ if accept('-') {
+ goto l30
+ }
+ if r < '0' {
+ goto l4out
+ }
+ if accept2('9') {
+ goto l35
+ }
+l4out:
+ return seq
+l7:
+ if r < '0' {
+ goto l7out
+ }
+ if accept2('9') {
+ goto l10
+ }
+l7out:
+ return seq
+l10:
+ length = pos
+ if accept('E') {
+ goto l18
+ }
+ if accept('e') {
+ goto l18
+ }
+ if r < '0' {
+ goto l15out
+ }
+ if accept2('9') {
+ goto l10
+ }
+l15out:
+ return seq
+l18:
+ if accept('+') {
+ goto l23
+ }
+ if accept('-') {
+ goto l23
+ }
+ if r < '0' {
+ goto l20out
+ }
+ if accept2('9') {
+ goto l26
+ }
+l20out:
+ return seq
+l23:
+ if r < '0' {
+ goto l23out
+ }
+ if accept2('9') {
+ goto l26
+ }
+l23out:
+ return seq
+l26:
+ length = pos
+ if r < '0' {
+ goto l27out
+ }
+ if accept2('9') {
+ goto l26
+ }
+l27out:
+ return seq
+l30:
+ if accept('.') {
+ goto l7
+ }
+ if r < '0' {
+ goto l32out
+ }
+ if accept2('9') {
+ goto l35
+ }
+l32out:
+ return seq
+l35:
+ length = pos
+ if accept('.') {
+ goto l7
+ }
+ if accept('E') {
+ goto l18
+ }
+ if accept('e') {
+ goto l18
+ }
+ if r < '0' {
+ goto l42out
+ }
+ if accept2('9') {
+ goto l35
+ }
+l42out:
+ return seq
+}
diff --git a/vendor/modernc.org/libc/signal/capi_illumos_amd64.go b/vendor/modernc.org/libc/signal/capi_illumos_amd64.go
new file mode 100644
index 000000000..4a5c0b123
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/capi_illumos_amd64.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_illumos_amd64.go -pkgname signal', DO NOT EDIT.
+
+package signal
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/signal/capi_linux_loong64.go b/vendor/modernc.org/libc/signal/capi_linux_loong64.go
index 20eeb2da0..fdb9d9a5d 100644
--- a/vendor/modernc.org/libc/signal/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/signal/capi_linux_loong64.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 -ignore-unsupported-alignment -o signal/signal_linux_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_linux_loong64.go -pkgname signal', DO NOT EDIT.
package signal
diff --git a/vendor/modernc.org/libc/signal/capi_linux_mips64le.go b/vendor/modernc.org/libc/signal/capi_linux_mips64le.go
new file mode 100644
index 000000000..20eeb2da0
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/capi_linux_mips64le.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_linux_amd64.go -pkgname signal', DO NOT EDIT.
+
+package signal
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/signal/more_illumos_amd64.go b/vendor/modernc.org/libc/signal/more_illumos_amd64.go
new file mode 100644
index 000000000..25cc318bf
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/more_illumos_amd64.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 (
+ // /usr/include/asm-generic/signal-defs.h:24:#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
+ SIG_DFL = 0
+ // /usr/include/asm-generic/signal-defs.h:25:#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
+ SIG_IGN = 1
+)
diff --git a/vendor/modernc.org/libc/signal/more_linux_mips64le.go b/vendor/modernc.org/libc/signal/more_linux_mips64le.go
new file mode 100644
index 000000000..25cc318bf
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/more_linux_mips64le.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 (
+ // /usr/include/asm-generic/signal-defs.h:24:#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
+ SIG_DFL = 0
+ // /usr/include/asm-generic/signal-defs.h:25:#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
+ SIG_IGN = 1
+)
diff --git a/vendor/modernc.org/libc/signal/signal_illumos_amd64.go b/vendor/modernc.org/libc/signal/signal_illumos_amd64.go
new file mode 100644
index 000000000..940a4b348
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/signal_illumos_amd64.go
@@ -0,0 +1,4146 @@
+// 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_illumos_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 // machsig.h:109:1:
+ BUS_ADRERR = 2 // machsig.h:110:1:
+ BUS_OBJERR = 3 // machsig.h:112:1:
+ CLD_CONTINUED = 6 // siginfo.h:169:1:
+ CLD_DUMPED = 3 // siginfo.h:166:1:
+ CLD_EXITED = 1 // siginfo.h:164:1:
+ CLD_KILLED = 2 // siginfo.h:165:1:
+ CLD_STOPPED = 5 // siginfo.h:168:1:
+ CLD_TRAPPED = 4 // siginfo.h:167:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ EMT_CPCOVF = 1 // machsig.h:74:1:
+ FC_ALIGN = 0x2 // faultcode.h:54:1:
+ FC_HWERR = 0x1 // faultcode.h:53:1:
+ FC_NOMAP = 0x5 // faultcode.h:57:1:
+ FC_NOSUPPORT = 0x6 // faultcode.h:58:1:
+ FC_OBJERR = 0x3 // faultcode.h:55:1:
+ FC_PROT = 0x4 // faultcode.h:56:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FPE_FLTDEN = 9 // machsig.h:90:1:
+ FPE_FLTDIV = 3 // machsig.h:84:1:
+ FPE_FLTINV = 7 // machsig.h:88:1:
+ FPE_FLTOVF = 4 // machsig.h:85:1:
+ FPE_FLTRES = 6 // machsig.h:87:1:
+ FPE_FLTSUB = 8 // machsig.h:89:1:
+ FPE_FLTUND = 5 // machsig.h:86:1:
+ FPE_INTDIV = 1 // machsig.h:82:1:
+ FPE_INTOVF = 2 // machsig.h:83:1:
+ ILL_BADSTK = 8 // machsig.h:64:1:
+ ILL_COPROC = 7 // machsig.h:63:1:
+ ILL_ILLADR = 3 // machsig.h:59:1:
+ ILL_ILLOPC = 1 // machsig.h:57:1:
+ ILL_ILLOPN = 2 // machsig.h:58:1:
+ ILL_ILLTRP = 4 // machsig.h:60:1:
+ ILL_PRVOPC = 5 // machsig.h:61:1:
+ ILL_PRVREG = 6 // machsig.h:62:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MAXSIG = 74 // signal.h:163:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ MINSIGSTKSZ = 2048 // signal.h:166:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ NSIG = 75 // signal.h:162:1:
+ NSIGBUS = 3 // machsig.h:115:1:
+ NSIGCLD = 6 // siginfo.h:172:1:
+ NSIGEMT = 1 // machsig.h:75:1:
+ NSIGFPE = 9 // machsig.h:92:1:
+ NSIGILL = 8 // machsig.h:66:1:
+ NSIGPOLL = 6 // siginfo.h:187:1:
+ NSIGPROF = 1 // siginfo.h:198:1:
+ NSIGSEGV = 2 // machsig.h:102:1:
+ NSIGTRAP = 6 // siginfo.h:157:1:
+ POLL_ERR = 4 // siginfo.h:182:1:
+ POLL_HUP = 6 // siginfo.h:184:1:
+ POLL_IN = 1 // siginfo.h:179:1:
+ POLL_MSG = 3 // siginfo.h:181:1:
+ POLL_OUT = 2 // siginfo.h:180:1:
+ POLL_PRI = 5 // siginfo.h:183:1:
+ PROF_SIG = 1 // siginfo.h:197:1:
+ P_INITPGID = 0 // procset.h:50:1:
+ P_INITPID = 1 // procset.h:48:1:
+ P_INITUID = 0 // procset.h:49:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SA_NOCLDSTOP = 0x00020000 // signal.h:128:1:
+ SA_NOCLDWAIT = 0x00010000 // signal.h:155:1:
+ SA_NODEFER = 0x00000010 // signal.h:152:1:
+ SA_ONSTACK = 0x00000001 // signal.h:138:1:
+ SA_RESETHAND = 0x00000002 // signal.h:139:1:
+ SA_RESTART = 0x00000004 // signal.h:140:1:
+ SA_SIGINFO = 0x00000008 // signal.h:146:1:
+ SEC = 1 // time.h:244:1:
+ SEGV_ACCERR = 2 // machsig.h:100:1:
+ SEGV_MAPERR = 1 // machsig.h:99:1:
+ SIG2STR_MAX = 32 // signal.h:95:1:
+ SIGABRT = 6 // signal_iso.h:58:1:
+ SIGALRM = 14 // signal_iso.h:66:1:
+ SIGBUS = 10 // signal_iso.h:62:1:
+ SIGCANCEL = 36 // signal_iso.h:90:1:
+ SIGCHLD = 18 // signal_iso.h:71:1:
+ SIGCLD = 18 // signal_iso.h:70:1:
+ SIGCONT = 25 // signal_iso.h:79:1:
+ SIGEMT = 7 // signal_iso.h:59:1:
+ SIGEV_NONE = 1 // siginfo.h:95:1:
+ SIGEV_PORT = 4 // siginfo.h:98:1:
+ SIGEV_SIGNAL = 2 // siginfo.h:96:1:
+ SIGEV_THREAD = 3 // siginfo.h:97:1:
+ SIGFPE = 8 // signal_iso.h:60:1:
+ SIGFREEZE = 34 // signal_iso.h:88:1:
+ SIGHUP = 1 // signal_iso.h:52:1:
+ SIGILL = 4 // signal_iso.h:55:1:
+ SIGINFO = 41 // signal_iso.h:95:1:
+ SIGINT = 2 // signal_iso.h:53:1:
+ SIGIO = 22 // signal_iso.h:76:1:
+ SIGIOT = 6 // signal_iso.h:57:1:
+ SIGJVM1 = 39 // signal_iso.h:93:1:
+ SIGJVM2 = 40 // signal_iso.h:94:1:
+ SIGKILL = 9 // signal_iso.h:61:1:
+ SIGLOST = 37 // signal_iso.h:91:1:
+ SIGLWP = 33 // signal_iso.h:87:1:
+ SIGPIPE = 13 // signal_iso.h:65:1:
+ SIGPOLL = 22 // signal_iso.h:75:1:
+ SIGPROF = 29 // signal_iso.h:83:1:
+ SIGPWR = 19 // signal_iso.h:72:1:
+ SIGQUIT = 3 // signal_iso.h:54:1:
+ SIGSEGV = 11 // signal_iso.h:63:1:
+ SIGSTKSZ = 8192 // signal.h:167:1:
+ SIGSTOP = 23 // signal_iso.h:77:1:
+ SIGSYS = 12 // signal_iso.h:64:1:
+ SIGTERM = 15 // signal_iso.h:67:1:
+ SIGTHAW = 35 // signal_iso.h:89:1:
+ SIGTRAP = 5 // signal_iso.h:56:1:
+ SIGTSTP = 24 // signal_iso.h:78:1:
+ SIGTTIN = 26 // signal_iso.h:80:1:
+ SIGTTOU = 27 // signal_iso.h:81:1:
+ SIGURG = 21 // signal_iso.h:74:1:
+ SIGUSR1 = 16 // signal_iso.h:68:1:
+ SIGUSR2 = 17 // signal_iso.h:69:1:
+ SIGVTALRM = 28 // signal_iso.h:82:1:
+ SIGWAITING = 32 // signal_iso.h:86:1:
+ SIGWINCH = 20 // signal_iso.h:73:1:
+ SIGXCPU = 30 // signal_iso.h:84:1:
+ SIGXFSZ = 31 // signal_iso.h:85:1:
+ SIGXRES = 38 // signal_iso.h:92:1:
+ SIG_BLOCK = 1 // signal_iso.h:131:1:
+ SIG_SETMASK = 3 // signal_iso.h:133:1:
+ SIG_UNBLOCK = 2 // signal_iso.h:132:1:
+ SI_ASYNCIO = -4 // siginfo.h:134:1:
+ SI_DTRACE = 2050 // siginfo.h:128:1:
+ SI_LWP = -1 // siginfo.h:131:1:
+ SI_MAXSZ = 256 // siginfo.h:206:1:
+ SI_MESGQ = -5 // siginfo.h:135:1:
+ SI_NOINFO = 32767 // siginfo.h:127:1:
+ SI_QUEUE = -2 // siginfo.h:132:1:
+ SI_RCTL = 2049 // siginfo.h:129:1:
+ SI_TIMER = -3 // siginfo.h:133:1:
+ SI_USER = 0 // siginfo.h:130:1:
+ SN_CANCEL = 2 // signal.h:226:1:
+ SN_PROC = 1 // signal.h:225:1:
+ SN_SEND = 3 // signal.h:227:1:
+ SS_DISABLE = 0x00000002 // signal.h:170:1:
+ SS_ONSTACK = 0x00000001 // signal.h:169:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TRAP_BRKPT = 1 // siginfo.h:150:1:
+ TRAP_DTRACE = 6 // siginfo.h:155:1:
+ TRAP_RWATCH = 3 // siginfo.h:152:1:
+ TRAP_TRACE = 2 // siginfo.h:151:1:
+ TRAP_WWATCH = 4 // siginfo.h:153:1:
+ TRAP_XWATCH = 5 // siginfo.h:154:1:
+ X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
+ X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
+ X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
+ X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
+ X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
+ X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
+ X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
+ X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
+ X_CS_LFS_LIBS = 70 // unistd.h:58:1:
+ X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
+ X_CS_PATH = 65 // unistd.h:50:1:
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
+ X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
+ X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
+ X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_SIGNAL_ISO_H = 0 // signal_iso.h:46:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
+ X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
+ X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
+ X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
+ X_PC_ASYNC_IO = 10 // unistd.h:299:1:
+ X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
+ X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
+ X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
+ X_PC_LAST = 101 // unistd.h:336:1:
+ X_PC_LINK_MAX = 1 // unistd.h:289:1:
+ X_PC_MAX_CANON = 2 // unistd.h:290:1:
+ X_PC_MAX_INPUT = 3 // unistd.h:291:1:
+ X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
+ X_PC_NAME_MAX = 4 // unistd.h:292:1:
+ X_PC_NO_TRUNC = 7 // unistd.h:295:1:
+ X_PC_PATH_MAX = 5 // unistd.h:293:1:
+ X_PC_PIPE_BUF = 6 // unistd.h:294:1:
+ X_PC_PRIO_IO = 11 // unistd.h:300:1:
+ X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
+ X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
+ X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
+ X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
+ X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
+ X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
+ X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
+ X_PC_SYNC_IO = 12 // unistd.h:301:1:
+ X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
+ X_PC_VDISABLE = 8 // unistd.h:296:1:
+ X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
+ X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
+ X_POSIX2_C_BIND = 1 // unistd.h:401:1:
+ X_POSIX2_C_DEV = 1 // unistd.h:402:1:
+ X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
+ X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
+ X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
+ X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
+ X_POSIX2_UPE = 1 // unistd.h:406:1:
+ X_POSIX2_VERSION = 199209 // unistd.h:363:1:
+ X_POSIX_REGEXP = 1 // unistd.h:410:1:
+ X_POSIX_SHELL = 1 // unistd.h:411:1:
+ X_POSIX_VERSION = 199506 // unistd.h:355:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
+ X_SC_2_C_BIND = 45 // unistd.h:153:1:
+ X_SC_2_C_DEV = 46 // unistd.h:154:1:
+ X_SC_2_C_VERSION = 47 // unistd.h:155:1:
+ X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
+ X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
+ X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
+ X_SC_2_PBS = 724 // unistd.h:246:1:
+ X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
+ X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
+ X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
+ X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
+ X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
+ X_SC_2_SW_DEV = 51 // unistd.h:159:1:
+ X_SC_2_UPE = 52 // unistd.h:160:1:
+ X_SC_2_VERSION = 53 // unistd.h:161:1:
+ X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
+ X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
+ X_SC_AIO_MAX = 19 // unistd.h:126:1:
+ X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
+ X_SC_ARG_MAX = 1 // unistd.h:106:1:
+ X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
+ X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
+ X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
+ X_SC_BARRIERS = 732 // unistd.h:253:1:
+ X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
+ X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
+ X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
+ X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
+ X_SC_CHILD_MAX = 2 // unistd.h:107:1:
+ X_SC_CLK_TCK = 3 // unistd.h:108:1:
+ X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
+ X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
+ X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
+ X_SC_CPUID_MAX = 517 // unistd.h:211:1:
+ X_SC_CPUTIME = 734 // unistd.h:255:1:
+ X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
+ X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
+ X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
+ X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
+ X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
+ X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
+ X_SC_EPHID_MAX = 518 // unistd.h:212:1:
+ X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
+ X_SC_FSYNC = 23 // unistd.h:130:1:
+ X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
+ X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
+ X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
+ X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
+ X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
+ X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
+ X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
+ X_SC_IOV_MAX = 77 // unistd.h:180:1:
+ X_SC_IPV6 = 762 // unistd.h:283:1:
+ X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
+ X_SC_LINE_MAX = 60 // unistd.h:168:1:
+ X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
+ X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
+ X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
+ X_SC_MAXPID = 514 // unistd.h:208:1:
+ X_SC_MEMLOCK = 25 // unistd.h:132:1:
+ X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
+ X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
+ X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
+ X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
+ X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
+ X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
+ X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
+ X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
+ X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
+ X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
+ X_SC_OPEN_MAX = 5 // unistd.h:110:1:
+ X_SC_PAGESIZE = 11 // unistd.h:117:1:
+ X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
+ X_SC_PASS_MAX = 9 // unistd.h:115:1:
+ X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
+ X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
+ X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
+ X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
+ X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
+ X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
+ X_SC_REGEXP = 738 // unistd.h:259:1:
+ X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
+ X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
+ X_SC_SAVED_IDS = 7 // unistd.h:112:1:
+ X_SC_SEMAPHORES = 35 // unistd.h:142:1:
+ X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
+ X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
+ X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
+ X_SC_SHELL = 739 // unistd.h:260:1:
+ X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
+ X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
+ X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
+ X_SC_SPAWN = 740 // unistd.h:261:1:
+ X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
+ X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
+ X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
+ X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
+ X_SC_STACK_PROT = 515 // unistd.h:209:1:
+ X_SC_STREAM_MAX = 16 // unistd.h:122:1:
+ X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
+ X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
+ X_SC_THREADS = 576 // unistd.h:227:1:
+ X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
+ X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
+ X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
+ X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
+ X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
+ X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
+ X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
+ X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
+ X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
+ X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
+ X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
+ X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
+ X_SC_TIMEOUTS = 747 // unistd.h:268:1:
+ X_SC_TIMERS = 43 // unistd.h:150:1:
+ X_SC_TIMER_MAX = 44 // unistd.h:151:1:
+ X_SC_TRACE = 748 // unistd.h:269:1:
+ X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
+ X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
+ X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
+ X_SC_TRACE_LOG = 752 // unistd.h:273:1:
+ X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
+ X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
+ X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
+ X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
+ X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
+ X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
+ X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
+ X_SC_UADDR_MAX = 519 // unistd.h:213:1:
+ X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
+ X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
+ X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
+ X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
+ X_SC_VERSION = 8 // unistd.h:113:1:
+ X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
+ X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
+ X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
+ X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
+ X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
+ X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
+ X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
+ X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
+ X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
+ X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
+ X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
+ X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
+ X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
+ X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGNAL_H = 0 // signal.h:33:1:
+ X_SIGRTMAX = 74 // signal_iso.h:99:1:
+ X_SIGRTMIN = 42 // signal_iso.h:98:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STACK_T = 0 // signal.h:174:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHSIG_H = 0 // machsig.h:32:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_PROCSET_H = 0 // procset.h:32:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_SIGINFO_H = 0 // siginfo.h:31:1:
+ X_SYS_SIGNAL_H = 0 // signal.h:42:1:
+ X_SYS_SIGNAL_ISO_H = 0 // signal_iso.h:44:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UNISTD_H = 0 // unistd.h:40:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_VM_FAULTCODE_H = 0 // faultcode.h:40:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
+ X_XOPEN_REALTIME = 1 // unistd.h:388:1:
+ X_XOPEN_SHM = 1 // unistd.h:390:1:
+ X_XOPEN_STREAMS = 1 // unistd.h:412:1:
+ X_XOPEN_UNIX = 0 // unistd.h:382:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
+ X_XOPEN_XPG3 = 0 // unistd.h:380:1:
+ X_XOPEN_XPG4 = 0 // unistd.h:381:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file defines the data needed to specify a set of
+// processes. These types are used by the sigsend, sigsendset,
+// priocntl, priocntlset, waitid, evexit, and evexitset system
+// calls.
+
+// The following defines the values for an identifier type. It
+// specifies the interpretation of an id value. An idtype and
+// id together define a simple set of processes.
+const ( /* procset.h:58:1: */
+ P_PID = 0 // A process identifier.
+ P_PPID = 1 // A parent process identifier.
+ P_PGID = 2 // A process group (job control group)
+ // identifier.
+ P_SID = 3 // A session identifier.
+ P_CID = 4 // A scheduling class identifier.
+ P_UID = 5 // A user identifier.
+ P_GID = 6 // A group identifier.
+ P_ALL = 7 // All processes.
+ P_LWPID = 8 // An LWP 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
+)
+
+// The following defines the operations which can be performed to
+// combine two simple sets of processes to form another set of
+// processes.
+const ( /* procset.h:89:1: */
+ POP_DIFF = 0 // Set difference. The processes which
+ // are in the left operand set and not
+ // in the right operand set.
+ POP_AND = 1 // Set disjunction. The processes
+ // which are in both the left and right
+ // operand sets.
+ POP_OR = 2 // Set conjunction. The processes
+ // which are in either the left or the
+ // right operand sets (or both).
+ POP_XOR = 3
+) // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */ // System Private interface to sysconf()
+
+type Sig_atomic_t = int32 /* signal_iso.h:58:13 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <sys/signal.h.h>.
+
+// We need <sys/siginfo.h> for the declaration of siginfo_t.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// The union sigval is also defined in <time.h> as per X/Open and
+// POSIX requirements.
+
+// The sigevent structure is also defined in <time.h> as per X/Open and
+// POSIX requirements.
+
+// values of sigev_notify
+
+// negative signal codes are reserved for future use for user generated
+// signals
+
+// Get the machine dependent signal codes (SIGILL, SIGFPE, SIGSEGV, and
+// SIGBUS) from <sys/machsig.h>
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// machsig.h is the machine dependent portion of siginfo.h (and is
+// included by siginfo.h). A version of machsig.h should exist for
+// each architecture. The codes for SIGILL, SIGFPU, SIGSEGV and SIGBUS
+// are in this file. The codes for SIGTRAP, SIGCLD(SIGCHLD), and
+// SIGPOLL are architecture independent and may be found in siginfo.h.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file describes the data type returned by vm routines
+// which handle faults.
+//
+// If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value
+// returned by the underlying object mapped at the fault address.
+
+type Faultcode_t = int32 /* faultcode.h:66:13 */
+
+// SIGILL signal codes
+
+// SIGEMT signal codes
+
+// SIGFPE signal codes
+
+// SIGSEGV signal codes
+
+// SIGBUS signal codes
+
+// SIGTRAP signal codes
+
+// SIGCLD signal codes
+
+// SIGPOLL signal codes
+
+// SIGPROF signal codes
+
+// Inclusion of <sys/time_impl.h> is needed for the declaration of
+// timestruc_t. However, since inclusion of <sys/time_impl.h> results
+// in X/Open and POSIX namespace pollution, the definition for
+// timestruct_t has been duplicated in a standards namespace safe header
+// <sys/time_std_impl.h>. In <sys/time_std_impl.h>, the structure
+// name, tag, and member names, as well as the type itself, all have
+// leading underscores to protect namespace.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
+// Placement here is due to a dependency in <sys/select.h> which is included
+// by <sys/types.h> for the sigevent structure. Hence this inclusion must
+// follow that definition.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+type Siginfo = struct {
+ Fsi_signo int32
+ Fsi_code int32
+ Fsi_errno int32
+ Fsi_pad int32
+ F__data struct {
+ F__ccgo_pad1 [0]uint64
+ F__pad [60]int32
+ }
+} /* siginfo.h:237:9 */
+
+// SIGILL signal codes
+
+// SIGEMT signal codes
+
+// SIGFPE signal codes
+
+// SIGSEGV signal codes
+
+// SIGBUS signal codes
+
+// SIGTRAP signal codes
+
+// SIGCLD signal codes
+
+// SIGPOLL signal codes
+
+// SIGPROF signal codes
+
+// Inclusion of <sys/time_impl.h> is needed for the declaration of
+// timestruc_t. However, since inclusion of <sys/time_impl.h> results
+// in X/Open and POSIX namespace pollution, the definition for
+// timestruct_t has been duplicated in a standards namespace safe header
+// <sys/time_std_impl.h>. In <sys/time_std_impl.h>, the structure
+// name, tag, and member names, as well as the type itself, all have
+// leading underscores to protect namespace.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// The inclusion of <sys/types.h> is needed for definitions of pid_t, etc.
+// Placement here is due to a dependency in <sys/select.h> which is included
+// by <sys/types.h> for the sigevent structure. Hence this inclusion must
+// follow that definition.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+type Siginfo_t = Siginfo /* siginfo.h:304:3 */
+
+// XXX -- internal version is identical to siginfo_t but without the padding.
+// This must be maintained in sync with it.
+
+type K_siginfo = struct {
+ Fsi_signo int32
+ Fsi_code int32
+ Fsi_errno int32
+ Fsi_pad int32
+ F__data struct {
+ F__proc struct {
+ F__pid int32
+ F__ccgo_pad1 [4]byte
+ F__pdata struct {
+ F__kill struct {
+ F__uid uint32
+ F__ccgo_pad1 [4]byte
+ F__value struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+ }
+ }
+ F__ccgo_pad1 [8]byte
+ }
+ F__ctid int32
+ F__zoneid int32
+ }
+ }
+} /* siginfo.h:379:9 */
+
+// XXX -- internal version is identical to siginfo_t but without the padding.
+// This must be maintained in sync with it.
+
+type K_siginfo_t = K_siginfo /* siginfo.h:438:3 */
+
+type Sigqueue = struct {
+ Fsq_next uintptr
+ Fsq_info K_siginfo_t
+ Fsq_func uintptr
+ Fsq_backptr uintptr
+ Fsq_external int32
+ F__ccgo_pad1 [4]byte
+} /* siginfo.h:440:9 */
+
+type Sigqueue_t = Sigqueue /* siginfo.h:447:3 */
+
+// indication whether to queue the signal or not
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements
+
+type K_sigset_t = struct{ F__sigbits [3]uint32 } /* signal.h:73:3 */
+
+// The signal handler routine can have either one or three arguments.
+// Existing C code has used either form so not specifing the arguments
+// neatly finesses the problem. C++ doesn't accept this. To C++
+// "(*sa_handler)()" indicates a routine with no arguments (ANSI C would
+// specify this as "(*sa_handler)(void)"). One or the other form must be
+// used for C++ and the only logical choice is "(*sa_handler)(int)" to allow
+// the SIG_* defines to work. "(*sa_sigaction)(int, siginfo_t *, void *)"
+// can be used for the three argument form.
+
+// Note: storage overlap by sa_handler and sa_sigaction
+type Sigaction = struct {
+ Fsa_flags int32
+ F__ccgo_pad1 [4]byte
+ F_funcptr struct{ F_handler uintptr }
+ Fsa_mask Sigset_t
+} /* signal.h:89:1 */
+
+// this is only valid for SIGCLD
+
+// non-conformant ANSI compilation
+
+// definitions for the sa_flags field
+
+// this is only valid for SIGCLD
+
+// use of these symbols by applications is injurious
+// to binary compatibility
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements.
+type Sigaltstack = struct {
+ Fss_sp uintptr
+ Fss_size uint64
+ Fss_flags int32
+ F__ccgo_pad1 [4]byte
+} /* signal.h:176:9 */
+
+// this is only valid for SIGCLD
+
+// non-conformant ANSI compilation
+
+// definitions for the sa_flags field
+
+// this is only valid for SIGCLD
+
+// use of these symbols by applications is injurious
+// to binary compatibility
+
+// Duplicated in <sys/ucontext.h> as a result of XPG4v2 requirements.
+type Stack_t = Sigaltstack /* signal.h:183:3 */
+
+// signotify id used only by libc for mq_notify()/aio_notify()
+type Signotify_id = struct {
+ Fsn_pid int32
+ Fsn_index int32
+ Fsn_pad int32
+} /* signal.h:205:9 */
+
+// signotify id used only by libc for mq_notify()/aio_notify()
+type Signotify_id_t = Signotify_id /* signal.h:209:3 */
+
+// Command codes for sig_notify call
+
+// Added as per XPG4v2
+type Sigstack = struct {
+ Fss_sp uintptr
+ Fss_onstack int32
+ F__ccgo_pad1 [4]byte
+} /* signal.h:235:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015, Joyent, Inc.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// This file defines the data needed to specify a set of
+// processes. These types are used by the sigsend, sigsendset,
+// priocntl, priocntlset, waitid, evexit, and evexitset system
+// calls.
+
+// The following defines the values for an identifier type. It
+// specifies the interpretation of an id value. An idtype and
+// id together define a simple set of processes.
+type Idtype_t = uint32 /* procset.h:80:3 */
+
+// The following defines the operations which can be performed to
+// combine two simple sets of processes to form another set of
+// processes.
+type Idop_t = uint32 /* procset.h:102:3 */
+
+// The following structure is used to define a set of processes.
+// The set is defined in terms of two simple sets of processes
+// and an operator which operates on these two operand sets.
+type Procset = struct {
+ Fp_op uint32
+ Fp_lidtype uint32
+ Fp_lid int32
+ Fp_ridtype uint32
+ Fp_rid int32
+} /* procset.h:110:9 */
+
+// The following structure is used to define a set of processes.
+// The set is defined in terms of two simple sets of processes
+// and an operator which operates on these two operand sets.
+type Procset_t = Procset /* procset.h:125:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/signal/signal_linux_loong64.go b/vendor/modernc.org/libc/signal/signal_linux_loong64.go
index b7cdcd8e7..0ed9d081e 100644
--- a/vendor/modernc.org/libc/signal/signal_linux_loong64.go
+++ b/vendor/modernc.org/libc/signal/signal_linux_loong64.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 -ignore-unsupported-alignment -o signal/signal_linux_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_linux_loong64.go -pkgname signal', DO NOT EDIT.
package signal
@@ -15,113 +15,145 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- FP_XSTATE_MAGIC1 = 0x46505853 // sigcontext.h:27:1:
- FP_XSTATE_MAGIC2 = 0x46505845 // sigcontext.h:28:1:
- MINSIGSTKSZ = 2048 // sigstack.h:27:1:
- NGREG = 23 // ucontext.h:42:1:
- NSIG = 65 // signal.h:181:1:
- SA_INTERRUPT = 0x20000000 // sigaction.h:70:1:
- SA_NOCLDSTOP = 1 // sigaction.h:56:1:
- SA_NOCLDWAIT = 2 // sigaction.h:57:1:
- SA_NODEFER = 0x40000000 // sigaction.h:65:1:
- SA_NOMASK = 1073741824 // sigaction.h:73:1:
- SA_ONESHOT = 2147483648 // sigaction.h:74:1:
- SA_ONSTACK = 0x08000000 // sigaction.h:61:1:
- SA_RESETHAND = 0x80000000 // sigaction.h:67:1:
- SA_RESTART = 0x10000000 // sigaction.h:64:1:
- SA_SIGINFO = 4 // sigaction.h:58:1:
- SA_STACK = 134217728 // sigaction.h:75:1:
- SIGABRT = 6 // signum-generic.h:50:1:
- SIGALRM = 14 // signum-generic.h:63:1:
- SIGBUS = 7 // signum.h:35:1:
- SIGCHLD = 17 // signum.h:41:1:
- SIGCLD = 17 // signum-generic.h:88:1:
- SIGCONT = 18 // signum.h:43:1:
- SIGFPE = 8 // signum-generic.h:51:1:
- SIGHUP = 1 // signum-generic.h:56:1:
- SIGILL = 4 // signum-generic.h:49:1:
- SIGINT = 2 // signum-generic.h:48:1:
- SIGIO = 29 // signum-generic.h:86:1:
- SIGIOT = 6 // signum-generic.h:87:1:
- SIGKILL = 9 // signum-generic.h:59:1:
- SIGPIPE = 13 // signum-generic.h:62:1:
- SIGPOLL = 29 // signum.h:51:1:
- SIGPROF = 27 // signum-generic.h:77:1:
- SIGPWR = 30 // signum.h:32:1:
- SIGQUIT = 3 // signum-generic.h:57:1:
- SIGSEGV = 11 // signum-generic.h:52:1:
- SIGSTKFLT = 16 // signum.h:31:1:
- SIGSTKSZ = 8192 // sigstack.h:30:1:
- SIGSTOP = 19 // signum.h:45:1:
- SIGSYS = 31 // signum.h:53:1:
- SIGTERM = 15 // signum-generic.h:53:1:
- SIGTRAP = 5 // signum-generic.h:58:1:
- SIGTSTP = 20 // signum.h:47:1:
- SIGTTIN = 21 // signum-generic.h:71:1:
- SIGTTOU = 22 // signum-generic.h:72:1:
- SIGURG = 23 // signum.h:49:1:
- SIGUSR1 = 10 // signum.h:37:1:
- SIGUSR2 = 12 // signum.h:39:1:
- SIGVTALRM = 26 // signum-generic.h:76:1:
- SIGWINCH = 28 // signum-generic.h:83:1:
- SIGXCPU = 24 // signum-generic.h:74:1:
- SIGXFSZ = 25 // signum-generic.h:75:1:
- SIG_BLOCK = 0 // sigaction.h:79:1:
- SIG_SETMASK = 2 // sigaction.h:81:1:
- SIG_UNBLOCK = 1 // sigaction.h:80:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_SIGACTION_H = 1 // sigaction.h:20:1:
- X_BITS_SIGCONTEXT_H = 1 // sigcontext.h:19:1:
- X_BITS_SIGEVENT_CONSTS_H = 1 // sigevent-consts.h:20:1:
- X_BITS_SIGINFO_ARCH_H = 1 // siginfo-arch.h:3:1:
- X_BITS_SIGINFO_CONSTS_H = 1 // siginfo-consts.h:20:1:
- X_BITS_SIGNUM_GENERIC_H = 1 // signum-generic.h:20:1:
- X_BITS_SIGNUM_H = 1 // signum.h:20:1:
- X_BITS_SIGSTACK_H = 1 // sigstack.h:20:1:
- X_BITS_SIGTHREAD_H = 1 // sigthread.h:20:1:
- X_BITS_SS_FLAGS_H = 1 // ss_flags.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_NSIG = 65 // signum-generic.h:100:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIGNAL_H = 0 // signal.h:23:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_UCONTEXT_H = 1 // ucontext.h:19:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ CONTEXT_INFO_ALIGN = 16 // sigcontext.h:28:1:
+ FPU_CTX_ALIGN = 8 // sigcontext.h:37:1:
+ FPU_CTX_MAGIC = 0x46505501 // sigcontext.h:36:1:
+ LARCH_NGREG = 32 // ucontext.h:31:1:
+ LARCH_REG_A0 = 4 // ucontext.h:37:1:
+ LARCH_REG_NARGS = 8 // ucontext.h:39:1:
+ LARCH_REG_RA = 1 // ucontext.h:33:1:
+ LARCH_REG_S0 = 23 // ucontext.h:35:1:
+ LARCH_REG_S1 = 24 // ucontext.h:36:1:
+ LARCH_REG_S2 = 25 // ucontext.h:38:1:
+ LARCH_REG_SP = 3 // ucontext.h:34:1:
+ LASX_CTX_ALIGN = 32 // sigcontext.h:55:1:
+ LASX_CTX_MAGIC = 0x41535801 // sigcontext.h:54:1:
+ LSX_CTX_ALIGN = 16 // sigcontext.h:46:1:
+ LSX_CTX_MAGIC = 0x53580001 // sigcontext.h:45:1:
+ MINSIGSTKSZ = 4096 // sigstack.h:27:1:
+ NSIG = 65 // signal.h:184:1:
+ SA_INTERRUPT = 0x20000000 // sigaction.h:70:1:
+ SA_NOCLDSTOP = 1 // sigaction.h:56:1:
+ SA_NOCLDWAIT = 2 // sigaction.h:57:1:
+ SA_NODEFER = 0x40000000 // sigaction.h:65:1:
+ SA_NOMASK = 1073741824 // sigaction.h:73:1:
+ SA_ONESHOT = 2147483648 // sigaction.h:74:1:
+ SA_ONSTACK = 0x08000000 // sigaction.h:61:1:
+ SA_RESETHAND = 0x80000000 // sigaction.h:67:1:
+ SA_RESTART = 0x10000000 // sigaction.h:64:1:
+ SA_SIGINFO = 4 // sigaction.h:58:1:
+ SA_STACK = 134217728 // sigaction.h:75:1:
+ SC_ADDRERR_RD = 1073741824 // sigcontext.h:17:1:
+ SC_ADDRERR_WR = 2147483648 // sigcontext.h:19:1:
+ SC_USED_FP = 1 // sigcontext.h:15:1:
+ SIGABRT = 6 // signum-generic.h:50:1:
+ SIGALRM = 14 // signum-generic.h:61:1:
+ SIGBUS = 7 // signum-arch.h:33:1:
+ SIGCHLD = 17 // signum-arch.h:41:1:
+ SIGCLD = 17 // signum-arch.h:59:1:
+ SIGCONT = 18 // signum-arch.h:40:1:
+ SIGFPE = 8 // signum-generic.h:51:1:
+ SIGHUP = 1 // signum-generic.h:56:1:
+ SIGILL = 4 // signum-generic.h:49:1:
+ SIGINT = 2 // signum-generic.h:48:1:
+ SIGIO = 29 // signum-arch.h:57:1:
+ SIGIOT = 6 // signum-arch.h:58:1:
+ SIGKILL = 9 // signum-generic.h:59:1:
+ SIGPIPE = 13 // signum-generic.h:60:1:
+ SIGPOLL = 29 // signum-arch.h:44:1:
+ SIGPROF = 27 // signum-arch.h:48:1:
+ SIGPWR = 30 // signum-arch.h:30:1:
+ SIGQUIT = 3 // signum-generic.h:57:1:
+ SIGSEGV = 11 // signum-generic.h:52:1:
+ SIGSTKFLT = 16 // signum-arch.h:29:1:
+ SIGSTKSZ = 16384 // sigstack.h:30:1:
+ SIGSTOP = 19 // signum-arch.h:38:1:
+ SIGSYS = 31 // signum-arch.h:34:1:
+ SIGTERM = 15 // signum-generic.h:53:1:
+ SIGTRAP = 5 // signum-generic.h:58:1:
+ SIGTSTP = 20 // signum-arch.h:39:1:
+ SIGTTIN = 21 // signum-arch.h:42:1:
+ SIGTTOU = 22 // signum-arch.h:43:1:
+ SIGURG = 23 // signum-arch.h:37:1:
+ SIGUSR1 = 10 // signum-arch.h:49:1:
+ SIGUSR2 = 12 // signum-arch.h:50:1:
+ SIGVTALRM = 26 // signum-arch.h:47:1:
+ SIGWINCH = 28 // signum-arch.h:54:1:
+ SIGXCPU = 24 // signum-arch.h:46:1:
+ SIGXFSZ = 25 // signum-arch.h:45:1:
+ SIG_BLOCK = 0 // sigaction.h:79:1:
+ SIG_SETMASK = 2 // sigaction.h:81:1:
+ SIG_UNBLOCK = 1 // sigaction.h:80:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ASM_GENERIC_INT_LL64_H = 0 // int-ll64.h:10:1:
+ X_ASM_GENERIC_TYPES_H = 0 // types.h:3:1:
+ X_ASM_SIGCONTEXT_H = 0 // sigcontext.h:9:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SIGACTION_H = 1 // sigaction.h:20:1:
+ X_BITS_SIGCONTEXT_H = 1 // sigcontext.h:19:1:
+ X_BITS_SIGEVENT_CONSTS_H = 1 // sigevent-consts.h:20:1:
+ X_BITS_SIGINFO_ARCH_H = 1 // siginfo-arch.h:3:1:
+ X_BITS_SIGINFO_CONSTS_H = 1 // siginfo-consts.h:20:1:
+ X_BITS_SIGNUM_ARCH_H = 1 // signum-arch.h:20:1:
+ X_BITS_SIGNUM_GENERIC_H = 1 // signum-generic.h:20:1:
+ X_BITS_SIGSTACK_H = 1 // sigstack.h:20:1:
+ X_BITS_SIGTHREAD_H = 1 // sigthread.h:20:1:
+ X_BITS_SS_FLAGS_H = 1 // ss_flags.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LINUX_STDDEF_H = 0 // stddef.h:3:1:
+ X_LINUX_TYPES_H = 0 // types.h:3:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_NSIG = 65 // signum-generic.h:79:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIGNAL_H = 0 // signal.h:23:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_UCONTEXT_H = 1 // ucontext.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// POSIX names to access some of the members.
// sigevent constants. Linux version.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -155,20 +187,22 @@ const ( /* siginfo-consts.h:119:1: */
SEGV_PKUERR = 4 // Protection key checking failure.
SEGV_ACCADI = 5 // ADI not enabled for mapped object.
SEGV_ADIDERR = 6 // Disrupting MCD error.
- SEGV_ADIPERR = 7
+ SEGV_ADIPERR = 7 // Precise MCD exception.
+ SEGV_MTEAERR = 8 // Asynchronous ARM MTE error.
+ SEGV_MTESERR = 9
)
// `si_code' values for SIGBUS signal.
-const ( /* siginfo-consts.h:138:1: */
+const ( /* siginfo-consts.h:142:1: */
BUS_ADRALN = 1 // Invalid address alignment.
- BUS_ADRERR = 2 // Non-existant physical address.
+ BUS_ADRERR = 2 // Non-existent physical address.
BUS_OBJERR = 3 // Object specific hardware error.
BUS_MCEERR_AR = 4 // Hardware memory error: action required.
BUS_MCEERR_AO = 5
)
// `si_code' values for SIGCHLD signal.
-const ( /* siginfo-consts.h:172:1: */
+const ( /* siginfo-consts.h:176:1: */
CLD_EXITED = 1 // Child has exited.
CLD_KILLED = 2 // Child was killed.
CLD_DUMPED = 3 // Child terminated abnormally.
@@ -178,7 +212,7 @@ const ( /* siginfo-consts.h:172:1: */
)
// `si_code' values for SIGPOLL signal.
-const ( /* siginfo-consts.h:189:1: */
+const ( /* siginfo-consts.h:193:1: */
POLL_IN = 1 // Data input available.
POLL_OUT = 2 // Output buffers available.
POLL_MSG = 3 // Input message available.
@@ -190,7 +224,7 @@ const ( /* siginfo-consts.h:189:1: */
// X/Open requires some more fields with fixed names.
// siginfo constants. Linux version.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -209,7 +243,7 @@ const ( /* siginfo-consts.h:189:1: */
// Most of these constants are uniform across all architectures, but there
// is one exception.
-// Architecture-specific adjustments to siginfo_t. x86 version.
+// Architecture-specific adjustments to siginfo_t.
// Values for `si_code'. Positive values are reserved for kernel-generated
//
@@ -256,7 +290,7 @@ const ( /* siginfo-consts.h:94:1: */
)
// sigstack, sigaltstack definitions.
-// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -277,8 +311,26 @@ const ( /* siginfo-consts.h:94:1: */
// System default stack size.
+// Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
+// Copyright (C) 2020-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// ss_flags values for stack_t. Linux version.
-// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// Copyright (C) 1998-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -319,7 +371,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -338,7 +390,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// ISO C99 Standard: 7.14 Signal handling <signal.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -370,6 +422,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -385,12 +439,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -431,6 +488,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -501,6 +560,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -519,9 +634,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -549,7 +670,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -570,23 +692,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -599,6 +722,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -619,8 +744,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -630,6 +755,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -658,8 +786,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -690,11 +823,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -704,11 +840,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -742,6 +894,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -755,13 +923,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -780,7 +965,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -797,11 +982,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -818,7 +1017,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -837,14 +1036,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -884,8 +1083,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -899,14 +1098,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -917,10 +1114,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -947,7 +1146,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -959,85 +1158,68 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-// Signal number definitions. Linux version.
-// Copyright (C) 1995-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
// Signal number constants. Generic template.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1071,11 +1253,6 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Historical signals specified by POSIX.
-// New(er) POSIX signals (1003.1-2008, 1003.1-2013).
-
-// Nonstandard signals found in all modern POSIX systems
-// (including both BSD and Linux).
-
// Archaic names for compatibility.
// Not all systems support real-time signals. bits/signum.h indicates
@@ -1085,13 +1262,41 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// use these constants in application code; use SIGRTMIN and SIGRTMAX
// (defined in signal.h) instead.
-// Biggest signal number + 1 (including real-time signals).
+// Include system specific bits.
+// Signal number definitions. Linux version.
+// Copyright (C) 1995-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
// Adjustments and additions to the signal number constants for
// most Linux systems.
+// Historical signals specified by POSIX.
+
+// New(er) POSIX signals (1003.1-2008, 1003.1-2013).
+
+// Nonstandard signals found in all modern POSIX systems
+// (including both BSD and Linux).
+
+// Archaic names for compatibility.
+
+// Biggest signal number + 1 (including real-time signals).
+
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1113,21 +1318,21 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// An integral type that can be modified atomically, without the
//
// 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 Sig_atomic_t = int32 /* sig_atomic_t.h:8:24 */
type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
// A set of signals to be blocked, unblocked, or waited for.
type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
-type Pid_t = X__pid_t /* signal.h:40:17 */
-type Uid_t = X__uid_t /* signal.h:46:17 */
+type Pid_t = int32 /* signal.h:40:17 */
+type Uid_t = uint32 /* signal.h:46:17 */
// We need `struct timespec' later on.
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1147,7 +1352,7 @@ type Uid_t = X__uid_t /* signal.h:46:17 */
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1174,24 +1379,61 @@ type Uid_t = X__uid_t /* signal.h:46:17 */
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = int64 /* time_t.h:10:18 */
+
// POSIX.1b structure for a time value. This is like a `struct timeval' but
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1211,7 +1453,7 @@ type Timespec = struct {
// Never include this file directly; use <sys/types.h> instead.
// Define __sigval_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1238,7 +1480,9 @@ type Sigval = struct {
type X__sigval_t = Sigval /* __sigval_t.h:30:22 */
// Some fields of siginfo_t have architecture-specific variations.
-// Architecture-specific adjustments to siginfo_t. x86 version.
+// Architecture-specific adjustments to siginfo_t.
+
+// This architecture has no adjustments to make to siginfo_t.
type Siginfo_t = struct {
Fsi_signo int32
@@ -1255,7 +1499,7 @@ type Siginfo_t = struct {
// These are all considered GNU extensions.
// Define __sigval_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1281,11 +1525,25 @@ type Siginfo_t = struct {
type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1305,7 +1563,7 @@ type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */
// Never include this file directly; use <sys/types.h> instead.
// Define __sigval_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1328,11 +1586,25 @@ type Pthread_attr_t1 = struct {
F__size [56]int8
} /* sigevent_t.h:17:9 */
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1352,7 +1624,7 @@ type Pthread_attr_t1 = struct {
// Never include this file directly; use <sys/types.h> instead.
// Define __sigval_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1390,12 +1662,12 @@ type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */
type X__sighandler_t = uintptr /* signal.h:72:14 */
// 4.4 BSD uses the name `sig_t' for this.
-type Sig_t = X__sighandler_t /* signal.h:190:24 */
+type Sig_t = uintptr /* signal.h:193:24 */
// Get the system-specific definitions of `struct sigaction'
// and the `SA_*' and `SIG_*'. constants.
// The proper definitions for Linux's sigaction.
-// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// Copyright (C) 1993-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1414,7 +1686,7 @@ type Sig_t = X__sighandler_t /* signal.h:190:24 */
// Structure describing the action to be taken when a signal arrives.
type Sigaction = struct {
- F__sigaction_handler struct{ Fsa_handler X__sighandler_t }
+ F__sigaction_handler struct{ Fsa_handler uintptr }
Fsa_mask X__sigset_t
Fsa_flags int32
F__ccgo_pad1 [4]byte
@@ -1422,7 +1694,7 @@ type Sigaction = struct {
} /* sigaction.h:27:1 */
// Get machine-dependent `struct sigcontext' and signal subcodes.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1432,136 +1704,234 @@ type Sigaction = struct {
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
+// Kernel headers before 2.1.1 define a struct sigcontext_struct, but
+// we need sigcontext.
+
+// SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
+// Author: Hanlu Li <lihanlu@loongson.cn>
+// Huacai Chen <chenhuacai@loongson.cn>
//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
+// Copyright (C) 2020-2022 Loongson Technology Corporation Limited
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// int-ll64 is used everywhere now.
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// asm-generic/int-ll64.h
//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// Integer declarations for architectures which use "long long"
+// for 64-bit types.
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// In order to keep safe and avoid regression, only unify uapi
+// bitsperlong.h for some archs which are using newer toolchains
+// that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
+// See the following link for more info:
+// https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
+
+// __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
+// header files exported to user space
+
+type X__s8 = int8 /* int-ll64.h:20:25 */
+type X__u8 = uint8 /* int-ll64.h:21:23 */
+
+type X__s16 = int16 /* int-ll64.h:23:26 */
+type X__u16 = uint16 /* int-ll64.h:24:24 */
+
+type X__s32 = int32 /* int-ll64.h:26:24 */
+type X__u32 = uint32 /* int-ll64.h:27:22 */
+
+type X__s64 = int64 /* int-ll64.h:30:44 */
+type X__u64 = uint64 /* int-ll64.h:31:42 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// *
+// __struct_group() - Create a mirrored named and anonyomous struct
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
+// @TAG: The tag name for the named sub-struct (usually empty)
+// @NAME: The identifier name of the mirrored sub-struct
+// @ATTRS: Any struct attributes (usually empty)
+// @MEMBERS: The member declarations for the mirrored structs
+//
+// Used to create an anonymous union of two structs with identical layout
+// and size: one anonymous and one named. The former's members can be used
+// normally without sub-struct naming, and the latter can be used to
+// reason about the start, end, and size of the group of struct members.
+// The named struct can also be explicitly tagged for layer reuse, as well
+// as both having struct attributes appended.
-// Never include this file directly; use <sys/types.h> instead.
+// *
+// __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+//
+// @TYPE: The type of each flexible array element
+// @NAME: The name of the flexible array member
+//
+// In order to have a flexible array member in a union or alone in a
+// struct, it needs to be wrapped in an anonymous struct with at least 1
+// named member, but that member can be empty.
-type X_fpx_sw_bytes = struct {
- Fmagic1 X__uint32_t
- Fextended_size X__uint32_t
- Fxstate_bv X__uint64_t
- Fxstate_size X__uint32_t
- F__glibc_reserved1 [7]X__uint32_t
-} /* sigcontext.h:31:1 */
-
-type X_fpreg = struct {
- Fsignificand [4]uint16
- Fexponent uint16
-} /* sigcontext.h:40:1 */
-
-type X_fpxreg = struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
-} /* sigcontext.h:46:1 */
-
-type X_xmmreg = struct{ Felement [4]X__uint32_t } /* sigcontext.h:53:1 */
-
-type X_fpstate = struct {
- Fcwd X__uint16_t
- Fswd X__uint16_t
- Fftw X__uint16_t
- Ffop X__uint16_t
- Frip X__uint64_t
- Frdp X__uint64_t
- Fmxcsr X__uint32_t
- Fmxcr_mask X__uint32_t
- F_st [8]struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
- }
- F_xmm [16]struct{ Felement [4]X__uint32_t }
- F__glibc_reserved1 [24]X__uint32_t
-} /* sigcontext.h:123:1 */
+// This allows for 1024 file descriptors: if NR_OPEN is ever grown
+// beyond that you'll have to change this too. But 1024 fd's seem to be
+// enough even for such "real" unices like OSF/1, so hopefully this is
+// one limit that doesn't have to be changed [again].
+//
+// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
+// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
+// place for them. Solved by having dummy defines in <sys/time.h>.
+
+// This macro may have been defined in <gnu/types.h>. But we always
+// use the one here.
+
+type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
+
+// Type of a signal handler.
+type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
+
+// Type of a SYSV IPC key.
+type X__kernel_key_t = int32 /* posix_types.h:33:13 */
+type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc.
+//
+// First the types that are often defined in different ways across
+// architectures, so that you can override them.
+
+type X__kernel_long_t = int64 /* posix_types.h:15:15 */
+type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
+
+type X__kernel_ino_t = uint64 /* posix_types.h:20:26 */
+
+type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
+
+type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
+
+type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
+
+type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
+type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
+
+type X__kernel_suseconds_t = int64 /* posix_types.h:41:26 */
+
+type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
+
+type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
+type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+
+type X__kernel_old_uid_t = uint32 /* posix_types.h:54:24 */
+type X__kernel_old_gid_t = uint32 /* posix_types.h:55:24 */
+
+type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
+
+// Most 32 bit architectures use "unsigned int" size_t,
+// and all 64 bit architectures use "unsigned long" size_t.
+type X__kernel_size_t = uint64 /* posix_types.h:72:26 */
+type X__kernel_ssize_t = int64 /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = int64 /* posix_types.h:74:25 */
+
+type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
+
+// anything below here should be completely generic
+type X__kernel_off_t = int64 /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = int64 /* posix_types.h:89:25 */
+type X__kernel_time_t = int64 /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = int64 /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+
+// type X__s128 = libc.Int128 /* types.h:12:29 */
+// type X__u128 = libc.Uint128 /* types.h:13:27 */
+
+// Below are truly Linux-specific types that should never collide with
+// any application/library that wants linux/types.h.
+
+// sparse defines __CHECKER__; see Documentation/dev-tools/sparse.rst
+
+// The kernel doesn't use this legacy form, but user space does
+
+type X__le16 = uint16 /* types.h:31:25 */
+type X__be16 = uint16 /* types.h:32:25 */
+type X__le32 = uint32 /* types.h:33:25 */
+type X__be32 = uint32 /* types.h:34:25 */
+type X__le64 = uint64 /* types.h:35:25 */
+type X__be64 = uint64 /* types.h:36:25 */
+
+type X__sum16 = uint16 /* types.h:38:25 */
+type X__wsum = uint32 /* types.h:39:25 */
+
+// aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
+// common 32/64-bit compat problems.
+// 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
+// architectures) and to 8-byte boundaries on 64-bit architectures. The new
+// aligned_64 type enforces 8-byte alignment so that structs containing
+// aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
+// No conversions are necessary between 32-bit user-space and a 64-bit kernel.
+
+type X__poll_t = uint32 /* types.h:54:28 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// FP context was used
+// Address error was due to memory load
+// Address error was due to memory store
type Sigcontext = struct {
- Fr8 X__uint64_t
- Fr9 X__uint64_t
- Fr10 X__uint64_t
- Fr11 X__uint64_t
- Fr12 X__uint64_t
- Fr13 X__uint64_t
- Fr14 X__uint64_t
- Fr15 X__uint64_t
- Frdi X__uint64_t
- Frsi X__uint64_t
- Frbp X__uint64_t
- Frbx X__uint64_t
- Frdx X__uint64_t
- Frax X__uint64_t
- Frcx X__uint64_t
- Frsp X__uint64_t
- Frip X__uint64_t
- Feflags X__uint64_t
- Fcs uint16
- Fgs uint16
- Ffs uint16
- F__pad0 uint16
- Ferr X__uint64_t
- Ftrapno X__uint64_t
- Foldmask X__uint64_t
- Fcr2 X__uint64_t
- F__184 struct{ Ffpstate uintptr }
- F__reserved1 [8]X__uint64_t
-} /* sigcontext.h:139:1 */
-
-type X_xsave_hdr = struct {
- Fxstate_bv X__uint64_t
- F__glibc_reserved1 [2]X__uint64_t
- F__glibc_reserved2 [5]X__uint64_t
-} /* sigcontext.h:177:1 */
-
-type X_ymmh_state = struct{ Fymmh_space [64]X__uint32_t } /* sigcontext.h:184:1 */
-
-type X_xstate = struct {
- Ffpstate struct {
- Fcwd X__uint16_t
- Fswd X__uint16_t
- Fftw X__uint16_t
- Ffop X__uint16_t
- Frip X__uint64_t
- Frdp X__uint64_t
- Fmxcsr X__uint32_t
- Fmxcr_mask X__uint32_t
- F_st [8]struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
- }
- F_xmm [16]struct{ Felement [4]X__uint32_t }
- F__glibc_reserved1 [24]X__uint32_t
- }
- Fxstate_hdr struct {
- Fxstate_bv X__uint64_t
- F__glibc_reserved1 [2]X__uint64_t
- F__glibc_reserved2 [5]X__uint64_t
- }
- Fymmh struct{ Fymmh_space [64]X__uint32_t }
-} /* sigcontext.h:189:1 */
+ F__ccgo_pad1 [0]uint64
+ Fsc_pc uint64
+ Fsc_regs [32]uint64
+ Fsc_flags uint32
+ F__ccgo_pad2 [4]byte
+} /* sigcontext.h:21:1 */
+
+type Sctx_info = struct {
+ Fmagic uint32
+ Fsize uint32
+ Fpadding uint64
+} /* sigcontext.h:29:1 */
+
+// FPU context
+type Fpu_context = struct {
+ Fregs [32]uint64
+ Ffcc uint64
+ Ffcsr uint32
+ F__ccgo_pad1 [4]byte
+} /* sigcontext.h:38:1 */
+
+// LSX context
+type Lsx_context = struct {
+ Fregs [64]uint64
+ Ffcc uint64
+ Ffcsr uint32
+ F__ccgo_pad1 [4]byte
+} /* sigcontext.h:47:1 */
+
+// LASX context
+type Lasx_context = struct {
+ Fregs [128]uint64
+ Ffcc uint64
+ Ffcsr uint32
+ F__ccgo_pad1 [4]byte
+} /* sigcontext.h:56:1 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -1574,7 +1944,7 @@ type X_xstate = struct {
// A null pointer constant.
// Define stack_t. Linux version.
-// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// Copyright (C) 1998-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1591,7 +1961,7 @@ type X_xstate = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1664,28 +2034,13 @@ type Stack_t = struct {
Fss_sp uintptr
Fss_flags int32
F__ccgo_pad1 [4]byte
- Fss_size Size_t
+ Fss_size uint64
} /* stack_t.h:31:5 */
// This will define `ucontext_t' and `mcontext_t'.
-// Copyright (C) 2001-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
+// struct ucontext definition.
+// Copyright (C) 2022-2023 Free Software Foundation, Inc.
//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1699,11 +2054,13 @@ type Stack_t = struct {
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
-// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Don't rely on this, the interface is currently messed up and may need to
+// be broken to be fixed.
+
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1720,10 +2077,8 @@ type Stack_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Never include this file directly; use <sys/types.h> instead.
-
// Define stack_t. Linux version.
-// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// Copyright (C) 1998-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1740,82 +2095,34 @@ type Stack_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Type for general register.
-type Greg_t = int64 /* ucontext.h:37:37 */
-
-// Number of general registers.
-
+type Greg_t = uint64 /* ucontext.h:41:27 */
// Container for all general registers.
-type Gregset_t = [23]Greg_t /* ucontext.h:46:16 */
-
-type X_libc_fpxreg = struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
-} /* ucontext.h:101:1 */
-
-type X_libc_xmmreg = struct{ Felement [4]X__uint32_t } /* ucontext.h:108:1 */
-
-type X_libc_fpstate = struct {
- Fcwd X__uint16_t
- Fswd X__uint16_t
- Fftw X__uint16_t
- Ffop X__uint16_t
- Frip X__uint64_t
- Frdp X__uint64_t
- Fmxcsr X__uint32_t
- Fmxcr_mask X__uint32_t
- F_st [8]struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
- }
- F_xmm [16]struct{ Felement [4]X__uint32_t }
- F__glibc_reserved1 [24]X__uint32_t
-} /* ucontext.h:113:1 */
+type Gregset_t = [32]uint64 /* ucontext.h:43:16 */
-// Structure to describe FPU registers.
-type Fpregset_t = uintptr /* ucontext.h:130:30 */
+type Mcontext_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__pc uint64
+ F__gregs [32]uint64
+ F__flags uint32
+ F__ccgo_pad2 [4]byte
+} /* ucontext.h:46:9 */
-// Context to describe whole processor state.
-type Mcontext_t = struct {
- Fgregs Gregset_t
- Ffpregs Fpregset_t
- F__reserved1 [8]uint64
-} /* ucontext.h:139:3 */
+type Mcontext_t = Mcontext_t1 /* ucontext.h:52:3 */
// Userlevel context.
type Ucontext_t1 = struct {
- Fuc_flags uint64
- Fuc_link uintptr
- Fuc_stack Stack_t
- Fuc_mcontext Mcontext_t
- Fuc_sigmask Sigset_t
- F__fpregs_mem struct {
- Fcwd X__uint16_t
- Fswd X__uint16_t
- Fftw X__uint16_t
- Ffop X__uint16_t
- Frip X__uint64_t
- Frdp X__uint64_t
- Fmxcsr X__uint32_t
- Fmxcr_mask X__uint32_t
- F_st [8]struct {
- Fsignificand [4]uint16
- Fexponent uint16
- F__glibc_reserved1 [3]uint16
- }
- F_xmm [16]struct{ Felement [4]X__uint32_t }
- F__glibc_reserved1 [24]X__uint32_t
- }
- F__ssp [4]uint64
-} /* ucontext.h:142:9 */
+ F__uc_flags uint64
+ Fuc_link uintptr
+ Fuc_stack Stack_t
+ Fuc_sigmask Sigset_t
+ Fuc_mcontext Mcontext_t
+} /* ucontext.h:55:9 */
// Userlevel context.
-type Ucontext_t = Ucontext_t1 /* ucontext.h:151:5 */
+type Ucontext_t = Ucontext_t1 /* ucontext.h:62:3 */
// Define struct sigstack.
-// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// Copyright (C) 1998-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1842,7 +2149,7 @@ type Sigstack = struct {
// Some of the functions for handling signals in threaded programs must
// be defined here.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1861,7 +2168,7 @@ type Sigstack = struct {
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1900,7 +2207,9 @@ type Sigstack = struct {
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1915,23 +2224,9 @@ type Sigstack = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
+// <http://www.gnu.org/licenses/>.
-// Some of the functions for handling signals in threaded programs must
-// be defined here.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1948,9 +2243,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1967,56 +2261,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -2032,8 +2296,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2050,16 +2314,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -2072,9 +2340,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -2091,6 +2376,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -2098,26 +2388,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -2153,7 +2446,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -2178,7 +2475,7 @@ type Pthread_barrierattr_t = struct {
// System-specific extensions.
// System-specific extensions of <signal.h>, Linux version.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
diff --git a/vendor/modernc.org/libc/signal/signal_linux_mips64le.go b/vendor/modernc.org/libc/signal/signal_linux_mips64le.go
new file mode 100644
index 000000000..b7cdcd8e7
--- /dev/null
+++ b/vendor/modernc.org/libc/signal/signal_linux_mips64le.go
@@ -0,0 +1,2198 @@
+// 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_linux_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 (
+ FP_XSTATE_MAGIC1 = 0x46505853 // sigcontext.h:27:1:
+ FP_XSTATE_MAGIC2 = 0x46505845 // sigcontext.h:28:1:
+ MINSIGSTKSZ = 2048 // sigstack.h:27:1:
+ NGREG = 23 // ucontext.h:42:1:
+ NSIG = 65 // signal.h:181:1:
+ SA_INTERRUPT = 0x20000000 // sigaction.h:70:1:
+ SA_NOCLDSTOP = 1 // sigaction.h:56:1:
+ SA_NOCLDWAIT = 2 // sigaction.h:57:1:
+ SA_NODEFER = 0x40000000 // sigaction.h:65:1:
+ SA_NOMASK = 1073741824 // sigaction.h:73:1:
+ SA_ONESHOT = 2147483648 // sigaction.h:74:1:
+ SA_ONSTACK = 0x08000000 // sigaction.h:61:1:
+ SA_RESETHAND = 0x80000000 // sigaction.h:67:1:
+ SA_RESTART = 0x10000000 // sigaction.h:64:1:
+ SA_SIGINFO = 4 // sigaction.h:58:1:
+ SA_STACK = 134217728 // sigaction.h:75:1:
+ SIGABRT = 6 // signum-generic.h:50:1:
+ SIGALRM = 14 // signum-generic.h:63:1:
+ SIGBUS = 7 // signum.h:35:1:
+ SIGCHLD = 17 // signum.h:41:1:
+ SIGCLD = 17 // signum-generic.h:88:1:
+ SIGCONT = 18 // signum.h:43:1:
+ SIGFPE = 8 // signum-generic.h:51:1:
+ SIGHUP = 1 // signum-generic.h:56:1:
+ SIGILL = 4 // signum-generic.h:49:1:
+ SIGINT = 2 // signum-generic.h:48:1:
+ SIGIO = 29 // signum-generic.h:86:1:
+ SIGIOT = 6 // signum-generic.h:87:1:
+ SIGKILL = 9 // signum-generic.h:59:1:
+ SIGPIPE = 13 // signum-generic.h:62:1:
+ SIGPOLL = 29 // signum.h:51:1:
+ SIGPROF = 27 // signum-generic.h:77:1:
+ SIGPWR = 30 // signum.h:32:1:
+ SIGQUIT = 3 // signum-generic.h:57:1:
+ SIGSEGV = 11 // signum-generic.h:52:1:
+ SIGSTKFLT = 16 // signum.h:31:1:
+ SIGSTKSZ = 8192 // sigstack.h:30:1:
+ SIGSTOP = 19 // signum.h:45:1:
+ SIGSYS = 31 // signum.h:53:1:
+ SIGTERM = 15 // signum-generic.h:53:1:
+ SIGTRAP = 5 // signum-generic.h:58:1:
+ SIGTSTP = 20 // signum.h:47:1:
+ SIGTTIN = 21 // signum-generic.h:71:1:
+ SIGTTOU = 22 // signum-generic.h:72:1:
+ SIGURG = 23 // signum.h:49:1:
+ SIGUSR1 = 10 // signum.h:37:1:
+ SIGUSR2 = 12 // signum.h:39:1:
+ SIGVTALRM = 26 // signum-generic.h:76:1:
+ SIGWINCH = 28 // signum-generic.h:83:1:
+ SIGXCPU = 24 // signum-generic.h:74:1:
+ SIGXFSZ = 25 // signum-generic.h:75:1:
+ SIG_BLOCK = 0 // sigaction.h:79:1:
+ SIG_SETMASK = 2 // sigaction.h:81:1:
+ SIG_UNBLOCK = 1 // sigaction.h:80:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SIGACTION_H = 1 // sigaction.h:20:1:
+ X_BITS_SIGCONTEXT_H = 1 // sigcontext.h:19:1:
+ X_BITS_SIGEVENT_CONSTS_H = 1 // sigevent-consts.h:20:1:
+ X_BITS_SIGINFO_ARCH_H = 1 // siginfo-arch.h:3:1:
+ X_BITS_SIGINFO_CONSTS_H = 1 // siginfo-consts.h:20:1:
+ X_BITS_SIGNUM_GENERIC_H = 1 // signum-generic.h:20:1:
+ X_BITS_SIGNUM_H = 1 // signum.h:20:1:
+ X_BITS_SIGSTACK_H = 1 // sigstack.h:20:1:
+ X_BITS_SIGTHREAD_H = 1 // sigthread.h:20:1:
+ X_BITS_SS_FLAGS_H = 1 // ss_flags.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_NSIG = 65 // signum-generic.h:100:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIGNAL_H = 0 // signal.h:23:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_UCONTEXT_H = 1 // ucontext.h:19:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// POSIX names to access some of the members.
+
+// sigevent constants. Linux version.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// `sigev_notify' values.
+const ( /* sigevent-consts.h:27:1: */
+ SIGEV_SIGNAL = 0 // Notify via signal.
+ SIGEV_NONE = 1 // Other notification: meaningless.
+ SIGEV_THREAD = 2 // Deliver via thread creation.
+
+ SIGEV_THREAD_ID = 4
+)
+
+// `si_code' values for SIGSEGV signal.
+const ( /* siginfo-consts.h:119:1: */
+ SEGV_MAPERR = 1 // Address not mapped to object.
+ SEGV_ACCERR = 2 // Invalid permissions for mapped object.
+ SEGV_BNDERR = 3 // Bounds checking failure.
+ SEGV_PKUERR = 4 // Protection key checking failure.
+ SEGV_ACCADI = 5 // ADI not enabled for mapped object.
+ SEGV_ADIDERR = 6 // Disrupting MCD error.
+ SEGV_ADIPERR = 7
+)
+
+// `si_code' values for SIGBUS signal.
+const ( /* siginfo-consts.h:138:1: */
+ BUS_ADRALN = 1 // Invalid address alignment.
+ BUS_ADRERR = 2 // Non-existant physical address.
+ BUS_OBJERR = 3 // Object specific hardware error.
+ BUS_MCEERR_AR = 4 // Hardware memory error: action required.
+ BUS_MCEERR_AO = 5
+)
+
+// `si_code' values for SIGCHLD signal.
+const ( /* siginfo-consts.h:172:1: */
+ CLD_EXITED = 1 // Child has exited.
+ CLD_KILLED = 2 // Child was killed.
+ CLD_DUMPED = 3 // Child terminated abnormally.
+ CLD_TRAPPED = 4 // Traced child has trapped.
+ CLD_STOPPED = 5 // Child has stopped.
+ CLD_CONTINUED = 6
+)
+
+// `si_code' values for SIGPOLL signal.
+const ( /* siginfo-consts.h:189:1: */
+ POLL_IN = 1 // Data input available.
+ POLL_OUT = 2 // Output buffers available.
+ POLL_MSG = 3 // Input message available.
+ POLL_ERR = 4 // I/O error.
+ POLL_PRI = 5 // High priority input available.
+ POLL_HUP = 6
+)
+
+// X/Open requires some more fields with fixed names.
+
+// siginfo constants. Linux version.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Most of these constants are uniform across all architectures, but there
+// is one exception.
+// Architecture-specific adjustments to siginfo_t. x86 version.
+
+// Values for `si_code'. Positive values are reserved for kernel-generated
+//
+// signals.
+const ( /* siginfo-consts.h:35:1: */
+ SI_ASYNCNL = -60 // Sent by asynch name lookup completion.
+ SI_DETHREAD = -7 // Sent by execve killing subsidiary
+ // threads.
+ SI_TKILL = -6 // Sent by tkill.
+ SI_SIGIO = -5 // Sent by queued SIGIO.
+ SI_ASYNCIO = -4 // Sent by AIO completion.
+ SI_MESGQ = -3 // Sent by real time mesq state change.
+ SI_TIMER = -2 // Sent by timer expiration.
+ SI_QUEUE = -1 // Sent by sigqueue.
+ SI_USER = 0 // Sent by kill, sigsend.
+ SI_KERNEL = 128
+)
+
+// `si_code' values for SIGILL signal.
+const ( /* siginfo-consts.h:71:1: */
+ ILL_ILLOPC = 1 // Illegal opcode.
+ ILL_ILLOPN = 2 // Illegal operand.
+ ILL_ILLADR = 3 // Illegal addressing mode.
+ ILL_ILLTRP = 4 // Illegal trap.
+ ILL_PRVOPC = 5 // Privileged opcode.
+ ILL_PRVREG = 6 // Privileged register.
+ ILL_COPROC = 7 // Coprocessor error.
+ ILL_BADSTK = 8 // Internal stack error.
+ ILL_BADIADDR = 9
+)
+
+// `si_code' values for SIGFPE signal.
+const ( /* siginfo-consts.h:94:1: */
+ FPE_INTDIV = 1 // Integer divide by zero.
+ FPE_INTOVF = 2 // Integer overflow.
+ FPE_FLTDIV = 3 // Floating point divide by zero.
+ FPE_FLTOVF = 4 // Floating point overflow.
+ FPE_FLTUND = 5 // Floating point underflow.
+ FPE_FLTRES = 6 // Floating point inexact result.
+ FPE_FLTINV = 7 // Floating point invalid operation.
+ FPE_FLTSUB = 8 // Subscript out of range.
+ FPE_FLTUNK = 14 // Undiagnosed floating-point exception.
+ FPE_CONDTRAP = 15
+)
+
+// sigstack, sigaltstack definitions.
+// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Minimum stack size for a signal handler.
+
+// System default stack size.
+
+// ss_flags values for stack_t. Linux version.
+// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Possible values for `ss_flags'.
+const ( /* ss_flags.h:27:1: */
+ SS_ONSTACK = 1
+ SS_DISABLE = 2
+)
+
+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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.14 Signal handling <signal.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// Signal number definitions. Linux version.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Signal number constants. Generic template.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Fake signal functions.
+
+// We define here all the signal names listed in POSIX (1003.1-2008);
+// as of 1003.1-2013, no additional signals have been added by POSIX.
+// We also define here signal names that historically exist in every
+// real-world POSIX variant (e.g. SIGWINCH).
+//
+// Signals in the 1-15 range are defined with their historical numbers.
+// For other signals, we use the BSD numbers.
+// There are two unallocated signal numbers in the 1-31 range: 7 and 29.
+// Signal number 0 is reserved for use as kill(pid, 0), to test whether
+// a process exists without sending it a signal.
+
+// ISO C99 signals.
+
+// Historical signals specified by POSIX.
+
+// New(er) POSIX signals (1003.1-2008, 1003.1-2013).
+
+// Nonstandard signals found in all modern POSIX systems
+// (including both BSD and Linux).
+
+// Archaic names for compatibility.
+
+// Not all systems support real-time signals. bits/signum.h indicates
+// that they are supported by overriding __SIGRTMAX to a value greater
+// than __SIGRTMIN. These constants give the kernel-level hard limits,
+// but some real-time signals may be used internally by glibc. Do not
+// use these constants in application code; use SIGRTMIN and SIGRTMAX
+// (defined in signal.h) instead.
+
+// Biggest signal number + 1 (including real-time signals).
+
+// Adjustments and additions to the signal number constants for
+// most Linux systems.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+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 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+type Pid_t = X__pid_t /* signal.h:40:17 */
+type Uid_t = X__uid_t /* signal.h:46:17 */
+
+// We need `struct timespec' later on.
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Define __sigval_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Type for data associated with a signal.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* __sigval_t.h:24:1 */
+
+type X__sigval_t = Sigval /* __sigval_t.h:30:22 */
+
+// Some fields of siginfo_t have architecture-specific variations.
+// Architecture-specific adjustments to siginfo_t. x86 version.
+
+type Siginfo_t = struct {
+ Fsi_signo int32
+ Fsi_errno int32
+ Fsi_code int32
+ F__pad0 int32
+ F_sifields struct {
+ F__ccgo_pad1 [0]uint64
+ F_pad [28]int32
+ }
+} /* siginfo_t.h:124:5 */
+
+// Architectures might also add architecture-specific constants.
+// These are all considered GNU extensions.
+
+// Define __sigval_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// To avoid sigval_t (not a standard type name) having C++ name
+// mangling depending on whether the selected standard includes union
+// sigval, it should not be defined at all when using a standard for
+// which the sigval name is not reserved; in that case, headers should
+// not include <bits/types/sigval_t.h> and should use only the
+// internal __sigval_t name.
+
+type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Define __sigval_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Forward declaration.
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* sigevent_t.h:17:9 */
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Define __sigval_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Forward declaration.
+type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */
+
+// Structure to transport application-defined values with signals.
+type Sigevent = struct {
+ Fsigev_value X__sigval_t
+ Fsigev_signo int32
+ Fsigev_notify int32
+ F_sigev_un struct {
+ F__ccgo_pad1 [0]uint64
+ F_pad [12]int32
+ }
+} /* sigevent_t.h:22:9 */
+
+// Structure to transport application-defined values with signals.
+type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */
+
+// Type of a signal handler.
+type X__sighandler_t = uintptr /* signal.h:72:14 */
+
+// 4.4 BSD uses the name `sig_t' for this.
+type Sig_t = X__sighandler_t /* signal.h:190:24 */
+
+// Get the system-specific definitions of `struct sigaction'
+// and the `SA_*' and `SIG_*'. constants.
+// The proper definitions for Linux's sigaction.
+// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Structure describing the action to be taken when a signal arrives.
+type Sigaction = struct {
+ F__sigaction_handler struct{ Fsa_handler X__sighandler_t }
+ Fsa_mask X__sigset_t
+ Fsa_flags int32
+ F__ccgo_pad1 [4]byte
+ Fsa_restorer uintptr
+} /* sigaction.h:27:1 */
+
+// Get machine-dependent `struct sigcontext' and signal subcodes.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type X_fpx_sw_bytes = struct {
+ Fmagic1 X__uint32_t
+ Fextended_size X__uint32_t
+ Fxstate_bv X__uint64_t
+ Fxstate_size X__uint32_t
+ F__glibc_reserved1 [7]X__uint32_t
+} /* sigcontext.h:31:1 */
+
+type X_fpreg = struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+} /* sigcontext.h:40:1 */
+
+type X_fpxreg = struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+} /* sigcontext.h:46:1 */
+
+type X_xmmreg = struct{ Felement [4]X__uint32_t } /* sigcontext.h:53:1 */
+
+type X_fpstate = struct {
+ Fcwd X__uint16_t
+ Fswd X__uint16_t
+ Fftw X__uint16_t
+ Ffop X__uint16_t
+ Frip X__uint64_t
+ Frdp X__uint64_t
+ Fmxcsr X__uint32_t
+ Fmxcr_mask X__uint32_t
+ F_st [8]struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+ }
+ F_xmm [16]struct{ Felement [4]X__uint32_t }
+ F__glibc_reserved1 [24]X__uint32_t
+} /* sigcontext.h:123:1 */
+
+type Sigcontext = struct {
+ Fr8 X__uint64_t
+ Fr9 X__uint64_t
+ Fr10 X__uint64_t
+ Fr11 X__uint64_t
+ Fr12 X__uint64_t
+ Fr13 X__uint64_t
+ Fr14 X__uint64_t
+ Fr15 X__uint64_t
+ Frdi X__uint64_t
+ Frsi X__uint64_t
+ Frbp X__uint64_t
+ Frbx X__uint64_t
+ Frdx X__uint64_t
+ Frax X__uint64_t
+ Frcx X__uint64_t
+ Frsp X__uint64_t
+ Frip X__uint64_t
+ Feflags X__uint64_t
+ Fcs uint16
+ Fgs uint16
+ Ffs uint16
+ F__pad0 uint16
+ Ferr X__uint64_t
+ Ftrapno X__uint64_t
+ Foldmask X__uint64_t
+ Fcr2 X__uint64_t
+ F__184 struct{ Ffpstate uintptr }
+ F__reserved1 [8]X__uint64_t
+} /* sigcontext.h:139:1 */
+
+type X_xsave_hdr = struct {
+ Fxstate_bv X__uint64_t
+ F__glibc_reserved1 [2]X__uint64_t
+ F__glibc_reserved2 [5]X__uint64_t
+} /* sigcontext.h:177:1 */
+
+type X_ymmh_state = struct{ Fymmh_space [64]X__uint32_t } /* sigcontext.h:184:1 */
+
+type X_xstate = struct {
+ Ffpstate struct {
+ Fcwd X__uint16_t
+ Fswd X__uint16_t
+ Fftw X__uint16_t
+ Ffop X__uint16_t
+ Frip X__uint64_t
+ Frdp X__uint64_t
+ Fmxcsr X__uint32_t
+ Fmxcr_mask X__uint32_t
+ F_st [8]struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+ }
+ F_xmm [16]struct{ Felement [4]X__uint32_t }
+ F__glibc_reserved1 [24]X__uint32_t
+ }
+ Fxstate_hdr struct {
+ Fxstate_bv X__uint64_t
+ F__glibc_reserved1 [2]X__uint64_t
+ F__glibc_reserved2 [5]X__uint64_t
+ }
+ Fymmh struct{ Fymmh_space [64]X__uint32_t }
+} /* sigcontext.h:189:1 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Define stack_t. Linux version.
+// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Structure describing a signal stack.
+type Stack_t = struct {
+ Fss_sp uintptr
+ Fss_flags int32
+ F__ccgo_pad1 [4]byte
+ Fss_size Size_t
+} /* stack_t.h:31:5 */
+
+// This will define `ucontext_t' and `mcontext_t'.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Define stack_t. Linux version.
+// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Type for general register.
+type Greg_t = int64 /* ucontext.h:37:37 */
+
+// Number of general registers.
+
+// Container for all general registers.
+type Gregset_t = [23]Greg_t /* ucontext.h:46:16 */
+
+type X_libc_fpxreg = struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+} /* ucontext.h:101:1 */
+
+type X_libc_xmmreg = struct{ Felement [4]X__uint32_t } /* ucontext.h:108:1 */
+
+type X_libc_fpstate = struct {
+ Fcwd X__uint16_t
+ Fswd X__uint16_t
+ Fftw X__uint16_t
+ Ffop X__uint16_t
+ Frip X__uint64_t
+ Frdp X__uint64_t
+ Fmxcsr X__uint32_t
+ Fmxcr_mask X__uint32_t
+ F_st [8]struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+ }
+ F_xmm [16]struct{ Felement [4]X__uint32_t }
+ F__glibc_reserved1 [24]X__uint32_t
+} /* ucontext.h:113:1 */
+
+// Structure to describe FPU registers.
+type Fpregset_t = uintptr /* ucontext.h:130:30 */
+
+// Context to describe whole processor state.
+type Mcontext_t = struct {
+ Fgregs Gregset_t
+ Ffpregs Fpregset_t
+ F__reserved1 [8]uint64
+} /* ucontext.h:139:3 */
+
+// Userlevel context.
+type Ucontext_t1 = struct {
+ Fuc_flags uint64
+ Fuc_link uintptr
+ Fuc_stack Stack_t
+ Fuc_mcontext Mcontext_t
+ Fuc_sigmask Sigset_t
+ F__fpregs_mem struct {
+ Fcwd X__uint16_t
+ Fswd X__uint16_t
+ Fftw X__uint16_t
+ Ffop X__uint16_t
+ Frip X__uint64_t
+ Frdp X__uint64_t
+ Fmxcsr X__uint32_t
+ Fmxcr_mask X__uint32_t
+ F_st [8]struct {
+ Fsignificand [4]uint16
+ Fexponent uint16
+ F__glibc_reserved1 [3]uint16
+ }
+ F_xmm [16]struct{ Felement [4]X__uint32_t }
+ F__glibc_reserved1 [24]X__uint32_t
+ }
+ F__ssp [4]uint64
+} /* ucontext.h:142:9 */
+
+// Userlevel context.
+type Ucontext_t = Ucontext_t1 /* ucontext.h:151:5 */
+
+// Define struct sigstack.
+// Copyright (C) 1998-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Structure describing a signal stack (obsolete).
+type Sigstack = struct {
+ Fss_sp uintptr
+ Fss_onstack int32
+ F__ccgo_pad1 [4]byte
+} /* struct_sigstack.h:23:1 */
+
+// Some of the functions for handling signals in threaded programs must
+// be defined here.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Some of the functions for handling signals in threaded programs must
+// be defined here.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// System-specific extensions.
+// System-specific extensions of <signal.h>, Linux version.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/stdio/capi_illumos_amd64.go b/vendor/modernc.org/libc/stdio/capi_illumos_amd64.go
new file mode 100644
index 000000000..1246ca73a
--- /dev/null
+++ b/vendor/modernc.org/libc/stdio/capi_illumos_amd64.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_illumos_amd64.go -pkgname stdio', DO NOT EDIT.
+
+package stdio
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/stdio/capi_linux_loong64.go b/vendor/modernc.org/libc/stdio/capi_linux_loong64.go
index e327db420..48233d32c 100644
--- a/vendor/modernc.org/libc/stdio/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/stdio/capi_linux_loong64.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 -ignore-unsupported-alignment -o stdio/stdio_linux_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_linux_loong64.go -pkgname stdio', DO NOT EDIT.
package stdio
diff --git a/vendor/modernc.org/libc/stdio/capi_linux_mips64le.go b/vendor/modernc.org/libc/stdio/capi_linux_mips64le.go
new file mode 100644
index 000000000..e327db420
--- /dev/null
+++ b/vendor/modernc.org/libc/stdio/capi_linux_mips64le.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_linux_amd64.go -pkgname stdio', DO NOT EDIT.
+
+package stdio
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go b/vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go
new file mode 100644
index 000000000..431d9d5ac
--- /dev/null
+++ b/vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go
@@ -0,0 +1,1020 @@
+// 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_illumos_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_iso.h:124:1:
+ EOF = -1 // stdio_iso.h:152:1:
+ FILENAME_MAX = 1024 // stdio_iso.h:156:1:
+ FOPEN_MAX = 20 // stdio_iso.h:155:1:
+ L_ctermid = 9 // stdio.h:207:1:
+ L_cuserid = 9 // stdio.h:211:1:
+ L_tmpnam = 25 // stdio_iso.h:163:1:
+ P_tmpdir = "/var/tmp/" // stdio.h:220:1:
+ SEEK_CUR = 1 // stdio_iso.h:159:1:
+ SEEK_END = 2 // stdio_iso.h:160:1:
+ SEEK_SET = 0 // stdio_iso.h:158:1:
+ TMP_MAX = 17576 // stdio_iso.h:161:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILEDEFED = 0 // stdio_iso.h:101:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IOEOF = 0020 // stdio_iso.h:143:1:
+ X_IOERR = 0040 // stdio_iso.h:144:1:
+ X_IOFBF = 0000 // stdio_iso.h:140:1:
+ X_IOLBF = 0100 // stdio_iso.h:141:1:
+ X_IOMYBUF = 0010 // stdio_iso.h:149:1:
+ X_IONBF = 0004 // stdio_iso.h:142:1:
+ X_IOREAD = 0001 // stdio_iso.h:146:1:
+ X_IORW = 0200 // stdio_iso.h:148:1:
+ X_IOWRT = 0002 // stdio_iso.h:147:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_STDIO_C99_H = 0 // stdio_c99.h:41:1:
+ X_ISO_STDIO_ISO_H = 0 // stdio_iso.h:59:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_NFILE = 20 // stdio_iso.h:135:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // stdio.h:170:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_SBFSIZ = 8 // stdio_iso.h:138:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIZE_T = 0 // stdio_iso.h:106:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // stdio.h:268:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_STDIO_H = 0 // stdio.h:44:1:
+ X_STDIO_IMPL_H = 0 // stdio_impl.h:28:1:
+ X_STDIO_TAG_H = 0 // stdio_tag.h:28:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_VA_LIST_H = 0 // va_list.h:34:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/stdio.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// Do all of our 'redefine_extname' processing before
+// declarations of the associated functions are seen.
+// This is necessary to keep gcc happy.
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/iso/stdio_iso.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <stdio.h>.
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The purpose of this header is to provide the type definitions for
+// the va_list argument used by a number of printf and printf like
+// functions. The headers that define these various function prototypes
+// #include this header directly. These include but are not necessarily
+// limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
+// <syslog.h>. The type definitions included in this header are for
+// the benefit of consumers of va_list.
+//
+// Any application that accepts variable argument lists must as documented,
+// include either <varargs.h> or the preferred <stdarg.h>. Doing so will
+// pull in the appropriate compiler protocols defined in <sys/va_impl.h>
+// which is in turn is included by <varargs.h> and <stdarg.h>. See comments
+// in <sys/va_impl.h> for more detailed information regarding implementation
+// and compiler specific protocols.
+
+// The common definitions exported by this header or compilers using
+// this header are:
+//
+// the identifier __builtin_va_alist for the variable list pseudo parameter
+// the type __va_alist_type for the variable list pseudo parameter
+// the type __va_list defining the type of the variable list iterator
+//
+// The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
+// (__GNUC__) and processor macros (e.g. __amd64) are intended to be
+// defined by the compilation system, not the user of the system.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__gnuc_va_list = uintptr /* va_list.h:108:27 */
+// XX64 This seems unnecessary .. but is needed because vcmn_err is
+//
+// defined with __va_list instead of plain old va_list.
+// Perhaps that should be fixed!
+type X__va_list = uintptr /* va_list.h:114:27 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE1 = struct{ F__pad [16]int64 } /* stdio_tag.h:40:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE = X__FILE1 /* stdio_tag.h:40:27 */
+
+// If feature test macros are set that enable interfaces that use types
+// defined in <sys/types.h>, get those types by doing the include.
+//
+// Note that in asking for the interfaces associated with this feature test
+// macro one also asks for definitions of the POSIX types.
+
+type FILE = X__FILE /* stdio_iso.h:102:16 */ // size of something in bytes
+
+type Fpos_t = int64 /* stdio_iso.h:115:15 */
+
+type Off_t = int64 /* stdio.h:172:15 */
+type Off64_t = int64 /* stdio.h:178:16 */
+
+type Fpos64_t = int64 /* stdio.h:188:17 */
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+type Ssize_t = int64 /* stdio.h:270:14 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go b/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go
index b11d50c87..797977f11 100644
--- a/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go
+++ b/vendor/modernc.org/libc/stdio/stdio_linux_loong64.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 -ignore-unsupported-alignment -o stdio/stdio_linux_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_linux_loong64.go -pkgname stdio', DO NOT EDIT.
package stdio
@@ -15,52 +15,65 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- BUFSIZ = 8192 // stdio.h:99:1:
- EOF = -1 // stdio.h:104:1:
- FILENAME_MAX = 4096 // stdio_lim.h:27:1:
- FOPEN_MAX = 16 // stdio_lim.h:37:1:
- L_ctermid = 9 // stdio_lim.h:30:1:
- L_tmpnam = 20 // stdio_lim.h:25:1:
- P_tmpdir = "/tmp" // stdio.h:120:1:
- SEEK_CUR = 1 // stdio.h:110:1:
- SEEK_END = 2 // stdio.h:111:1:
- SEEK_SET = 0 // stdio.h:109:1:
- TMP_MAX = 238328 // stdio_lim.h:26:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_STDIO_LIM_H = 1 // stdio_lim.h:19:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_IOFBF = 0 // stdio.h:93:1:
- X_IOLBF = 1 // stdio.h:94:1:
- X_IONBF = 2 // stdio.h:95:1:
- X_IO_EOF_SEEN = 0x0010 // struct_FILE.h:111:1:
- X_IO_ERR_SEEN = 0x0020 // struct_FILE.h:114:1:
- X_IO_USER_LOCK = 0x8000 // struct_FILE.h:117:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STDIO_H = 1 // stdio.h:24:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- X_VA_LIST_DEFINED = 0 // stdio.h:53:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ BUFSIZ = 8192 // stdio.h:99:1:
+ EOF = -1 // stdio.h:104:1:
+ FILENAME_MAX = 4096 // stdio_lim.h:26:1:
+ FOPEN_MAX = 16 // stdio.h:138:1:
+ L_ctermid = 9 // stdio.h:131:1:
+ L_tmpnam = 20 // stdio.h:123:1:
+ P_tmpdir = "/tmp" // stdio.h:120:1:
+ SEEK_CUR = 1 // stdio.h:110:1:
+ SEEK_END = 2 // stdio.h:111:1:
+ SEEK_SET = 0 // stdio.h:109:1:
+ TMP_MAX = 238328 // stdio.h:124:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_FLOATN_COMMON_H = 0 // floatn-common.h:21:1:
+ X_BITS_FLOATN_H = 0 // floatn.h:20:1:
+ X_BITS_STDIO_LIM_H = 1 // stdio_lim.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_IOFBF = 0 // stdio.h:93:1:
+ X_IOLBF = 1 // stdio.h:94:1:
+ X_IONBF = 2 // stdio.h:95:1:
+ X_IO_EOF_SEEN = 0x0010 // struct_FILE.h:111:1:
+ X_IO_ERR_SEEN = 0x0020 // struct_FILE.h:114:1:
+ X_IO_USER_LOCK = 0x8000 // struct_FILE.h:117:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STDIO_H = 1 // stdio.h:24:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ X_VA_LIST_DEFINED = 0 // stdio.h:53:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -91,7 +104,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// A null pointer constant.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -118,13 +131,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Define __gnuc_va_list.
-type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
+type X__gnuc_va_list = uintptr /* stdarg.h:40:27 */
// Define the standard macros for the user,
// if this invocation was from the user program.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -143,7 +156,7 @@ type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -160,11 +173,25 @@ type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -181,7 +208,7 @@ type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -200,14 +227,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -247,8 +274,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -262,14 +289,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -280,10 +305,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -310,7 +337,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -322,67 +349,68 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -417,7 +445,7 @@ type X__mbstate_t = struct {
// 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__pos int64
F__state X__mbstate_t
} /* __fpos_t.h:10:9 */
@@ -428,7 +456,7 @@ type X_G_fpos_t = struct {
type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -452,12 +480,12 @@ type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */
// 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__pos int64
F__state X__mbstate_t
} /* __fpos64_t.h:10:9 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -500,18 +528,18 @@ type X_IO_FILE = struct {
F_chain uintptr
F_fileno int32
F_flags2 int32
- F_old_offset X__off_t
+ F_old_offset int64
F_cur_column uint16
F_vtable_offset int8
F_shortbuf [1]int8
F__ccgo_pad2 [4]byte
F_lock uintptr
- F_offset X__off64_t
+ F_offset int64
F_codecvt uintptr
F_wide_data uintptr
F_freeres_list uintptr
F_freeres_buf uintptr
- F__pad5 Size_t
+ F__pad5 uint64
F_mode int32
F_unused2 [20]int8
} /* __FILE.h:4:1 */
@@ -521,19 +549,39 @@ type X__FILE = X_IO_FILE /* __FILE.h:5:25 */
// The opaque type of streams. This is the definition used elsewhere.
type FILE = X_IO_FILE /* FILE.h:7:25 */
-// These macros are used by bits/stdio.h and internal headers.
+// The structure with the cookie function pointers.
+//
+// The tag name of this struct is _IO_cookie_io_functions_t to
+// preserve historic C++ mangled names for functions taking
+// cookie_io_functions_t arguments. That name should not be used in
+// new code.
+type X_IO_cookie_io_functions_t = struct {
+ Fread uintptr
+ Fwrite uintptr
+ Fseek uintptr
+ Fclose uintptr
+} /* cookie_io_functions_t.h:55:9 */
-// Many more flag bits are defined internally.
+// The structure with the cookie function pointers.
+//
+// The tag name of this struct is _IO_cookie_io_functions_t to
+// preserve historic C++ mangled names for functions taking
+// cookie_io_functions_t arguments. That name should not be used in
+// new code.
+type Cookie_io_functions_t = X_IO_cookie_io_functions_t /* cookie_io_functions_t.h:61:3 */
-type Va_list = X__gnuc_va_list /* stdio.h:52:24 */
+type Va_list = uintptr /* stdio.h:52:24 */
-type Off_t = X__off64_t /* stdio.h:65:19 */
+type Off_t = int64 /* stdio.h:65:19 */
-type Ssize_t = X__ssize_t /* stdio.h:77:19 */
+type Ssize_t = int64 /* stdio.h:77:19 */
// The type of the second argument to `fgetpos' and `fsetpos'.
type Fpos_t = X__fpos64_t /* stdio.h:86:20 */
+// The following headers provide asm redirections. These redirections must
+// appear before the first usage of these functions, e.g. in bits/stdio.h.
+
// If we are compiling with optimizing read this file. It contains
// several optimizing inline functions and macros.
diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_mips64le.go b/vendor/modernc.org/libc/stdio/stdio_linux_mips64le.go
new file mode 100644
index 000000000..b11d50c87
--- /dev/null
+++ b/vendor/modernc.org/libc/stdio/stdio_linux_mips64le.go
@@ -0,0 +1,540 @@
+// 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_linux_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 = 8192 // stdio.h:99:1:
+ EOF = -1 // stdio.h:104:1:
+ FILENAME_MAX = 4096 // stdio_lim.h:27:1:
+ FOPEN_MAX = 16 // stdio_lim.h:37:1:
+ L_ctermid = 9 // stdio_lim.h:30:1:
+ L_tmpnam = 20 // stdio_lim.h:25:1:
+ P_tmpdir = "/tmp" // stdio.h:120:1:
+ SEEK_CUR = 1 // stdio.h:110:1:
+ SEEK_END = 2 // stdio.h:111:1:
+ SEEK_SET = 0 // stdio.h:109:1:
+ TMP_MAX = 238328 // stdio_lim.h:26:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_STDIO_LIM_H = 1 // stdio_lim.h:19:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_IOFBF = 0 // stdio.h:93:1:
+ X_IOLBF = 1 // stdio.h:94:1:
+ X_IONBF = 2 // stdio.h:95:1:
+ X_IO_EOF_SEEN = 0x0010 // struct_FILE.h:111:1:
+ X_IO_ERR_SEEN = 0x0020 // struct_FILE.h:114:1:
+ X_IO_USER_LOCK = 0x8000 // struct_FILE.h:117:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STDIO_H = 1 // stdio.h:24:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ X_VA_LIST_DEFINED = 0 // stdio.h:53:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.15 Variable arguments <stdarg.h>
+
+// Define __gnuc_va_list.
+
+type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
+
+// Define the standard macros for the user,
+// if this invocation was from the user program.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Integral type unchanged by default argument promotions that can
+// hold any value corresponding to members of the extended character
+// set, as well as at least one value that does not correspond to any
+// member of the extended character set.
+
+// Conversion state information.
+type X__mbstate_t = struct {
+ F__count int32
+ F__value struct{ F__wch uint32 }
+} /* __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.
+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.
+type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type X_G_fpos64_t = struct {
+ F__pos X__off64_t
+ F__state X__mbstate_t
+} /* __fpos64_t.h:10:9 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */
+
+type X_IO_FILE = struct {
+ F_flags int32
+ F__ccgo_pad1 [4]byte
+ F_IO_read_ptr uintptr
+ F_IO_read_end uintptr
+ F_IO_read_base uintptr
+ F_IO_write_base uintptr
+ F_IO_write_ptr uintptr
+ F_IO_write_end uintptr
+ F_IO_buf_base uintptr
+ F_IO_buf_end uintptr
+ F_IO_save_base uintptr
+ F_IO_backup_base uintptr
+ F_IO_save_end uintptr
+ F_markers uintptr
+ F_chain uintptr
+ F_fileno int32
+ F_flags2 int32
+ F_old_offset X__off_t
+ F_cur_column uint16
+ F_vtable_offset int8
+ F_shortbuf [1]int8
+ F__ccgo_pad2 [4]byte
+ F_lock uintptr
+ F_offset X__off64_t
+ F_codecvt uintptr
+ F_wide_data uintptr
+ F_freeres_list uintptr
+ F_freeres_buf uintptr
+ F__pad5 Size_t
+ F_mode int32
+ F_unused2 [20]int8
+} /* __FILE.h:4:1 */
+
+type X__FILE = X_IO_FILE /* __FILE.h:5:25 */
+
+// The opaque type of streams. This is the definition used elsewhere.
+type FILE = X_IO_FILE /* FILE.h:7:25 */
+
+// These macros are used by bits/stdio.h and internal headers.
+
+// Many more flag bits are defined internally.
+
+type Va_list = X__gnuc_va_list /* stdio.h:52:24 */
+
+type Off_t = X__off64_t /* stdio.h:65:19 */
+
+type Ssize_t = X__ssize_t /* stdio.h:77:19 */
+
+// The type of the second argument to `fgetpos' and `fsetpos'.
+type Fpos_t = X__fpos64_t /* stdio.h:86:20 */
+
+// If we are compiling with optimizing read this file. It contains
+// several optimizing inline functions and macros.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/stdlib/capi_illumos_amd64.go b/vendor/modernc.org/libc/stdlib/capi_illumos_amd64.go
new file mode 100644
index 000000000..41a7917a1
--- /dev/null
+++ b/vendor/modernc.org/libc/stdlib/capi_illumos_amd64.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_illumos_amd64.go -pkgname stdlib', DO NOT EDIT.
+
+package stdlib
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go b/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go
index bc0091ea3..67499fd99 100644
--- a/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/stdlib/capi_linux_loong64.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 -ignore-unsupported-alignment -o stdlib/stdlib_linux_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_linux_loong64.go -pkgname stdlib', DO NOT EDIT.
package stdlib
diff --git a/vendor/modernc.org/libc/stdlib/capi_linux_mips64le.go b/vendor/modernc.org/libc/stdlib/capi_linux_mips64le.go
new file mode 100644
index 000000000..bc0091ea3
--- /dev/null
+++ b/vendor/modernc.org/libc/stdlib/capi_linux_mips64le.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_linux_amd64.go -pkgname stdlib', DO NOT EDIT.
+
+package stdlib
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go
new file mode 100644
index 000000000..09f2553fb
--- /dev/null
+++ b/vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go
@@ -0,0 +1,1092 @@
+// 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_illumos_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_iso.h:84:1:
+ EXIT_SUCCESS = 0 // stdlib_iso.h:85:1:
+ INT16_MAX = 32767 // int_limits.h:93:1:
+ INT16_MIN = -32768 // int_limits.h:211:1:
+ INT32_MAX = 2147483647 // int_limits.h:94:1:
+ INT32_MIN = -2147483648 // int_limits.h:212:1:
+ INT64_MAX = 9223372036854775807 // int_limits.h:96:1:
+ INT64_MIN = -9223372036854775808 // int_limits.h:214:1:
+ INT8_MAX = 127 // int_limits.h:92:1:
+ INT8_MIN = -128 // int_limits.h:210:1:
+ INTMAX_MAX = 9223372036854775807 // int_limits.h:111:1:
+ INTMAX_MIN = -9223372036854775808 // int_limits.h:220:1:
+ INTPTR_MAX = 9223372036854775807 // int_limits.h:157:1:
+ INTPTR_MIN = -9223372036854775808 // int_limits.h:241:1:
+ INT_FAST16_MAX = 2147483647 // int_limits.h:137:1:
+ INT_FAST16_MIN = -2147483648 // int_limits.h:233:1:
+ INT_FAST32_MAX = 2147483647 // int_limits.h:138:1:
+ INT_FAST32_MIN = -2147483648 // int_limits.h:234:1:
+ INT_FAST64_MAX = 9223372036854775807 // int_limits.h:140:1:
+ INT_FAST64_MIN = -9223372036854775808 // int_limits.h:236:1:
+ INT_FAST8_MAX = 127 // int_limits.h:136:1:
+ INT_FAST8_MIN = -128 // int_limits.h:232:1:
+ INT_LEAST16_MAX = 32767 // int_limits.h:123:1:
+ INT_LEAST16_MIN = -32768 // int_limits.h:226:1:
+ INT_LEAST32_MAX = 2147483647 // int_limits.h:124:1:
+ INT_LEAST32_MIN = -2147483648 // int_limits.h:227:1:
+ INT_LEAST64_MAX = 9223372036854775807 // int_limits.h:126:1:
+ INT_LEAST64_MIN = -9223372036854775808 // int_limits.h:229:1:
+ INT_LEAST8_MAX = 127 // int_limits.h:122:1:
+ INT_LEAST8_MIN = -128 // int_limits.h:225:1:
+ PRIX32 = "X" // int_fmtio.h:211:1:
+ PRIX64 = "lX" // int_fmtio.h:216:1:
+ PRIXMAX = "lX" // int_fmtio.h:365:1:
+ PRIXPTR = "lX" // int_fmtio.h:237:1:
+ PRId32 = "d" // int_fmtio.h:102:1:
+ PRId64 = "ld" // int_fmtio.h:107:1:
+ PRIdMAX = "ld" // int_fmtio.h:360:1:
+ PRIdPTR = "ld" // int_fmtio.h:232:1:
+ PRIi32 = "i" // int_fmtio.h:123:1:
+ PRIi64 = "li" // int_fmtio.h:128:1:
+ PRIiMAX = "li" // int_fmtio.h:361:1:
+ PRIiPTR = "li" // int_fmtio.h:233:1:
+ PRIo32 = "o" // int_fmtio.h:148:1:
+ PRIo64 = "lo" // int_fmtio.h:153:1:
+ PRIoMAX = "lo" // int_fmtio.h:362:1:
+ PRIoPTR = "lo" // int_fmtio.h:234:1:
+ PRIu32 = "u" // int_fmtio.h:169:1:
+ PRIu64 = "lu" // int_fmtio.h:174:1:
+ PRIuMAX = "lu" // int_fmtio.h:364:1:
+ PRIuPTR = "lu" // int_fmtio.h:235:1:
+ PRIx32 = "x" // int_fmtio.h:190:1:
+ PRIx64 = "lx" // int_fmtio.h:195:1:
+ PRIxMAX = "lx" // int_fmtio.h:363:1:
+ PRIxPTR = "lx" // int_fmtio.h:236:1:
+ PTRDIFF_MAX = 9223372036854775807 // int_limits.h:166:1:
+ PTRDIFF_MIN = -9223372036854775808 // int_limits.h:248:1:
+ RAND_MAX = 32767 // stdlib_iso.h:86:1:
+ SCNX16 = "hX" // int_fmtio.h:336:1:
+ SCNX32 = "X" // int_fmtio.h:338:1:
+ SCNX8 = "hhX" // int_fmtio.h:333:1:
+ SCNd16 = "hd" // int_fmtio.h:253:1:
+ SCNd32 = "d" // int_fmtio.h:255:1:
+ SCNd8 = "hhd" // int_fmtio.h:250:1:
+ SCNi16 = "hi" // int_fmtio.h:269:1:
+ SCNi32 = "i" // int_fmtio.h:271:1:
+ SCNi8 = "hhi" // int_fmtio.h:266:1:
+ SCNo16 = "ho" // int_fmtio.h:288:1:
+ SCNo32 = "o" // int_fmtio.h:290:1:
+ SCNo8 = "hho" // int_fmtio.h:285:1:
+ SCNu16 = "hu" // int_fmtio.h:304:1:
+ SCNu32 = "u" // int_fmtio.h:306:1:
+ SCNu8 = "hhu" // int_fmtio.h:301:1:
+ SCNx16 = "hx" // int_fmtio.h:320:1:
+ SCNx32 = "x" // int_fmtio.h:322:1:
+ SCNx8 = "hhx" // int_fmtio.h:317:1:
+ SIG_ATOMIC_MAX = 2147483647 // int_limits.h:186:1:
+ SIG_ATOMIC_MIN = -2147483648 // int_limits.h:255:1:
+ SIZE_MAX = 18446744073709551615 // int_limits.h:179:1:
+ UINT16_MAX = 65535 // int_limits.h:102:1:
+ UINT32_MAX = 4294967295 // int_limits.h:103:1:
+ UINT64_MAX = 18446744073709551615 // int_limits.h:105:1:
+ UINT8_MAX = 255 // int_limits.h:101:1:
+ UINTMAX_MAX = 18446744073709551615 // int_limits.h:117:1:
+ UINTPTR_MAX = 18446744073709551615 // int_limits.h:158:1:
+ UINT_FAST16_MAX = 4294967295 // int_limits.h:144:1:
+ UINT_FAST32_MAX = 4294967295 // int_limits.h:145:1:
+ UINT_FAST64_MAX = 18446744073709551615 // int_limits.h:147:1:
+ UINT_FAST8_MAX = 255 // int_limits.h:143:1:
+ UINT_LEAST16_MAX = 65535 // int_limits.h:130:1:
+ UINT_LEAST32_MAX = 4294967295 // int_limits.h:131:1:
+ UINT_LEAST64_MAX = 18446744073709551615 // int_limits.h:133:1:
+ UINT_LEAST8_MAX = 255 // int_limits.h:129:1:
+ WCHAR_MAX = 2147483647 // int_limits.h:195:1:
+ WCHAR_MIN = -2147483648 // int_limits.h:264:1:
+ WINT_MAX = 2147483647 // int_limits.h:200:1:
+ WINT_MIN = -2147483648 // int_limits.h:269:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INTTYPES_H = 0 // inttypes.h:30:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_STDLIB_C11_H = 0 // stdlib_c11.h:28:1:
+ X_ISO_STDLIB_C99_H = 0 // stdlib_c99.h:41:1:
+ X_ISO_STDLIB_ISO_H = 0 // stdlib_iso.h:47:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MODF16 = "h" // int_fmtio.h:87:1:
+ X_MODF8 = "hh" // int_fmtio.h:86:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PRIX = "X" // int_fmtio.h:95:1:
+ X_PRId = "d" // int_fmtio.h:90:1:
+ X_PRIi = "i" // int_fmtio.h:91:1:
+ X_PRIo = "o" // int_fmtio.h:92:1:
+ X_PRIu = "u" // int_fmtio.h:93:1:
+ X_PRIx = "x" // int_fmtio.h:94:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIZE_T = 0 // stdlib_iso.h:76:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // stdlib.h:177:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_STDLIB_H = 0 // stdlib.h:38:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INTTYPES_H = 0 // inttypes.h:28:1:
+ X_SYS_INT_CONST_H = 0 // int_const.h:39:1:
+ X_SYS_INT_FMTIO_H = 0 // int_fmtio.h:30:1:
+ X_SYS_INT_LIMITS_H = 0 // int_limits.h:39:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_STDINT_H = 0 // stdint.h:28:1:
+ X_UID_T = 0 // stdlib.h:103:1:
+ X_WCHAR_T = 0 // stdlib_iso.h:103:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+
+type Div_t = struct {
+ Fquot int32
+ Frem int32
+} /* stdlib_iso.h:68:3 */
+
+type Ldiv_t = struct {
+ Fquot int64
+ Frem int64
+} /* stdlib_iso.h:73:3 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in
+// the C99 standard and in conflict with the C++ implementation of the
+// standard header. The C++ standard may adopt the C99 standard at
+// which point it is expected that the symbols included here will
+// become part of the C++ std namespace.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// The following have been added as a result of the ISO/IEC 9899:1999
+// standard. For a strictly conforming C application, visibility is
+// contingent on the value of __STDC_VERSION__ (see sys/feature_tests.h).
+// For non-strictly conforming C applications, there are no restrictions
+// on the C namespace.
+
+type Lldiv_t = struct {
+ Fquot int64
+ Frem int64
+} /* stdlib_c99.h:61:3 */
+
+// ISO C11 Annex K functions are not allowed to be in the standard
+// namespace; however, it is implementation-defined as to whether or
+// not they are in the global namespace and we opt to make them
+// available to software.
+
+// Allow global visibility for symbols defined in
+// C++ "std" namespace in <iso/stdlib_iso.h>.
+
+// Allow global visibility for symbols defined in
+// C++ "std" namespace in <iso/stdlib_c11.h>.
+
+type Uid_t = uint32 /* stdlib.h:104:22 */
+
+// swab() has historically been in <stdlib.h> as delivered from AT&T
+// and continues to be visible in the default compilation environment.
+// As of Issue 4 of the X/Open Portability Guides, swab() was declared
+// in <unistd.h>. As a result, with respect to X/Open namespace the
+// swab() declaration in this header is only visible for the XPG3
+// environment.
+type Ssize_t = int64 /* stdlib.h:179:14 */
+
+// OpenBSD and misc. compatibility functions
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <inttypes.h>, is specified by the ISO C standard,
+// standard, ISO/IEC 9899:1999 Programming language - C and is
+// also defined by SUSv3.
+//
+// ISO International Organization for Standardization.
+// SUSv3 Single Unix Specification, Version 3
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This header, <sys/inttypes.h>, contains (through nested inclusion) the
+// vast majority of the facilities specified for <inttypes.h> as defined
+// by the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
+//
+// Kernel/Driver developers are encouraged to include this file to access
+// the fixed size types, limits and utility macros. Application developers
+// should use the standard defined header <inttypes.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/int_limits.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <limits.h> This nested inclusion is disabled for strictly
+// ANSI-C conforming compilations. The *_MIN
+// definitions are not visible to POSIX or XPG
+// conforming applications (due to what may be
+// a bug in the specification - this is under
+// investigation)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Limits
+//
+// The following define the limits for the types defined in <sys/int_types.h>.
+//
+// INTMAX_MIN (minimum value of the largest supported signed integer type),
+// INTMAX_MAX (maximum value of the largest supported signed integer type),
+// and UINTMAX_MAX (maximum value of the largest supported unsigned integer
+// type) can be set to implementation defined limits.
+//
+// NOTE : A programmer can test to see whether an implementation supports
+// a particular size of integer by testing if the macro that gives the
+// maximum for that datatype is defined. For example, if #ifdef UINT64_MAX
+// tests false, the implementation does not support unsigned 64 bit integers.
+//
+// The type of these macros is intentionally unspecified.
+//
+// The types int8_t, int_least8_t, and int_fast8_t are not defined for ISAs
+// where the ABI specifies "char" as unsigned when the translation mode is
+// not ANSI-C.
+
+// The following 2 macros are provided for testing whether the types
+// intptr_t and uintptr_t (integers large enough to hold a void *) are
+// defined in this header. They are needed in case the architecture can't
+// represent a pointer in any standard integral type.
+
+// Maximum limits of ptrdiff_t defined in <sys/types.h>
+
+// Maximum value of a "size_t". SIZE_MAX was previously defined
+// in <limits.h>, however, the standards specify it be defined
+// in <stdint.h>. The <stdint.h> headers includes this header as
+// does <limits.h>. The value of SIZE_MAX should not deviate
+// from the value of ULONG_MAX defined <sys/types.h>.
+
+// Maximum limit of sig_atomic_t defined in <sys/types.h>
+
+// Maximum limit of wchar_t. The WCHAR_* macros are also
+// defined in <iso/wchar_iso.h>, but inclusion of that header
+// will break ISO/IEC C namespace.
+
+// Maximum limit of wint_t
+
+// It is probably a bug in the POSIX specification (IEEE-1003.1-1990) that
+// when including <limits.h> that the suffix _MAX is reserved but not the
+// suffix _MIN. However, until that issue is resolved....
+
+// Minimum value of a pointer-holding signed integer type
+
+// Minimum limits of ptrdiff_t defined in <sys/types.h>
+
+// Minimum limit of sig_atomic_t defined in <sys/types.h>
+
+// Minimum limit of wchar_t. The WCHAR_* macros are also
+// defined in <iso/wchar_iso.h>, but inclusion of that header
+// will break ISO/IEC C namespace.
+
+// Minimum limit of wint_t
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/int_const.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_const.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working
+// draft for the revision of the current ISO C standard, ISO/IEC 9899:1990
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+//
+// Use at your own risk. This file will track the evolution of the revision
+// of the current ISO C standard. As of February 1996, the committee is
+// squarely behind the fixed sized types.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Constants
+//
+// The following macros create constants of the types defined in
+// <sys/int_types.h>. The intent is that:
+// Constants defined using these macros have a specific size and
+// signedness. The suffix used for int64_t and uint64_t (ll and ull)
+// are for examples only. Implementations are permitted to use other
+// suffixes.
+//
+// The "CSTYLED" comments are flags to an internal code style analysis tool
+// telling it to silently accept the line which follows. This internal
+// standard requires a space between arguments, but the historical,
+// non-ANSI-C ``method'' of concatenation can't tolerate those spaces.
+// CSTYLED
+
+// CSTYLED
+
+// CSTYLED
+// CSTYLED
+// CSTYLED
+// CSTYLED
+
+// CSTYLED
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// ISO International Organization for Standardization.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Formatted I/O
+//
+// The following macros can be used even when an implementation has not
+// extended the printf/scanf family of functions.
+//
+// The form of the names of the macros is either "PRI" for printf specifiers
+// or "SCN" for scanf specifiers, followed by the conversion specifier letter
+// followed by the datatype size. For example, PRId32 is the macro for
+// the printf d conversion specifier with the flags for 32 bit datatype.
+//
+// An example using one of these macros:
+//
+// uint64_t u;
+// printf("u = %016" PRIx64 "\n", u);
+//
+// For the purpose of example, the definitions of the printf/scanf macros
+// below have the values appropriate for a machine with 8 bit shorts, 16
+// bit shorts, 32 bit ints, 32 or 64 bit longs depending on compilation
+// mode, and 64 bit long longs.
+
+// fprintf macros for signed integers
+
+// fprintf macros for unsigned integers
+
+// fprintf macros for pointers
+
+// fscanf macros for signed integers
+
+// fscanf macros for unsigned integers
+
+// The following macros define I/O formats for intmax_t and uintmax_t.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This header is included by <stdint.h> which was introduced by
+// the ISO C Standard, ISO/IEC 9899:1999 Programming language - C.
+// The header is a subset of the <inttypes.h> header.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/int_limits.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/int_const.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Inclusion of <stddef.h> breaks namespace, therefore define wchar_t
+
+// wchar_t is a built-in type in standard C++ and as such is not
+// defined here when using standard C++. However, the GNU compiler
+// fixincludes utility nonetheless creates its own version of this
+// header for use by gcc and g++. In that version it adds a redundant
+// guard for __cplusplus. To avoid the creation of a gcc/g++ specific
+// header we need to include the following magic comment:
+//
+// we must use the C++ compiler's type
+//
+// The above comment should not be removed or changed until GNU
+// gcc/fixinc/inclhack.def is updated to bypass this header.
+
+type Imaxdiv_t = struct {
+ Fquot int64
+ Frem int64
+} /* inttypes.h:84:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go
index 242876b7e..f37b85b2c 100644
--- a/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go
+++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.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 -ignore-unsupported-alignment -o stdlib/stdlib_linux_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_linux_loong64.go -pkgname stdlib', DO NOT EDIT.
package stdlib
@@ -15,109 +15,84 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- BIG_ENDIAN = 4321 // endian.h:28:1:
- BYTE_ORDER = 1234 // endian.h:30:1:
- EXIT_FAILURE = 1 // stdlib.h:91:1:
- EXIT_SUCCESS = 0 // stdlib.h:92:1:
- FD_SETSIZE = 1024 // select.h:73:1:
- LITTLE_ENDIAN = 1234 // endian.h:27:1:
- PDP_ENDIAN = 3412 // endian.h:29:1:
- RAND_MAX = 2147483647 // stdlib.h:86:1:
- WCONTINUED = 8 // waitflags.h:32:1:
- WEXITED = 4 // waitflags.h:31:1:
- WNOHANG = 1 // waitflags.h:25:1:
- WNOWAIT = 0x01000000 // waitflags.h:33:1:
- WSTOPPED = 2 // waitflags.h:30:1:
- WUNTRACED = 2 // waitflags.h:26:1:
- X_ALLOCA_H = 1 // alloca.h:19:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_FLOATN_COMMON_H = 0 // floatn-common.h:21:1:
- X_BITS_FLOATN_H = 0 // floatn.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ENDIAN_H = 1 // endian.h:19:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_GCC_WCHAR_T = 0 // stddef.h:273:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STDLIB_H = 1 // stdlib.h:35:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_TYPES_H = 1 // types.h:23:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- X_T_WCHAR = 0 // stddef.h:264:1:
- X_T_WCHAR_ = 0 // stddef.h:263:1:
- X_WCHAR_T = 0 // stddef.h:262:1:
- X_WCHAR_T_ = 0 // stddef.h:266:1:
- X_WCHAR_T_DECLARED = 0 // stddef.h:274:1:
- X_WCHAR_T_DEFINED = 0 // stddef.h:269:1:
- X_WCHAR_T_DEFINED_ = 0 // stddef.h:268:1:
- X_WCHAR_T_H = 0 // stddef.h:270:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
-)
-
-// A null pointer constant.
-
-// XPG requires a few symbols from <sys/wait.h> being defined.
-// Definitions of flag bits for `waitpid' et al.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Bits in the third argument to `waitpid'.
-
-// Bits in the fourth argument to `waitid'.
-
-// The following values are used by the `waitid' function.
-
-// The Linux kernel defines these bare, rather than an enum,
-// which causes a conflict if the include order is reversed.
-
-const ( /* waitflags.h:52:1: */
- P_ALL = 0 // Wait for any child.
- P_PID = 1 // Wait for specified process.
- P_PGID = 2
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ EXIT_FAILURE = 1 // stdlib.h:92:1:
+ EXIT_SUCCESS = 0 // stdlib.h:93:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ RAND_MAX = 2147483647 // stdlib.h:87:1:
+ WCONTINUED = 8 // waitflags.h:32:1:
+ WEXITED = 4 // waitflags.h:31:1:
+ WNOHANG = 1 // waitflags.h:25:1:
+ WNOWAIT = 0x01000000 // waitflags.h:33:1:
+ WSTOPPED = 2 // waitflags.h:30:1:
+ WUNTRACED = 2 // waitflags.h:26:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ALLOCA_H = 1 // alloca.h:19:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_FLOATN_COMMON_H = 0 // floatn-common.h:21:1:
+ X_BITS_FLOATN_H = 0 // floatn.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_GCC_WCHAR_T = 0 // stddef.h:280:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STDLIB_H = 1 // stdlib.h:36:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ X_T_WCHAR = 0 // stddef.h:271:1:
+ X_T_WCHAR_ = 0 // stddef.h:270:1:
+ X_WCHAR_T = 0 // stddef.h:269:1:
+ X_WCHAR_T_ = 0 // stddef.h:273:1:
+ X_WCHAR_T_DECLARED = 0 // stddef.h:281:1:
+ X_WCHAR_T_DEFINED = 0 // stddef.h:276:1:
+ X_WCHAR_T_DEFINED_ = 0 // stddef.h:275:1:
+ X_WCHAR_T_H = 0 // stddef.h:277:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -142,7 +117,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// XPG requires a few symbols from <sys/wait.h> being defined.
// Definitions of flag bits for `waitpid' et al.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -163,14 +138,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Bits in the fourth argument to `waitid'.
-// The following values are used by the `waitid' function.
-
-// The Linux kernel defines these bare, rather than an enum,
-// which causes a conflict if the include order is reversed.
-
-type Idtype_t = uint32 /* waitflags.h:57:3 */
// Definitions of status bits for `wait' et al.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -211,8 +180,8 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// Define the macros <sys/wait.h> also would define this way.
// _FloatN API tests for enablement.
-// Macros to control TS 18661-3 glibc features on x86.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -229,7 +198,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -246,11 +215,30 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
// Defined to 1 if the current compiler invocation provides a
// floating-point type with the IEEE 754 binary128 format, and this
-// glibc includes corresponding *f128 interfaces for it. The required
-// libgcc support was added some time after the basic compiler
-// support, for x86_64 and x86.
+// glibc includes corresponding *f128 interfaces for it.
// Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
// from the default float, double and long double types in this glibc.
@@ -273,22 +261,11 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// The type _Float128 exists only since GCC 7.0.
-// __builtin_huge_valf128 doesn't exist before GCC 7.0.
-
-// Older GCC has only a subset of built-in functions for _Float128 on
-// x86, and __builtin_infq is not usable in static initializers.
-// Converting a narrower sNaN to _Float128 produces a quiet NaN, so
-// attempts to use _Float128 sNaNs will not work properly with older
-// compilers.
-
-// In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
-// e.g.: __builtin_signbitf128, before GCC 6. However, there has never
-// been a __builtin_signbitf128 in GCC and the type-generic builtin is
-// only available since GCC 6.
+// Various built-in functions do not exist before GCC 7.0.
// Macros to control TS 18661-3 glibc features where the same
// definitions are appropriate for all platforms.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -305,7 +282,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -322,8 +299,8 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -393,21 +370,21 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
type Div_t = struct {
Fquot int32
Frem int32
-} /* stdlib.h:62:5 */
+} /* stdlib.h:63:5 */
// Returned by `ldiv'.
type Ldiv_t = struct {
Fquot int64
Frem int64
-} /* stdlib.h:70:5 */
+} /* stdlib.h:71:5 */
// Returned by `lldiv'.
type Lldiv_t = struct {
Fquot int64
Frem int64
-} /* stdlib.h:80:5 */
+} /* stdlib.h:81:5 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -426,7 +403,7 @@ type Lldiv_t = struct {
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -444,7 +421,7 @@ type Lldiv_t = struct {
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -463,7 +440,7 @@ type Lldiv_t = struct {
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -480,11 +457,25 @@ type Lldiv_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -501,7 +492,7 @@ type Lldiv_t = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -520,14 +511,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -567,8 +558,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -582,14 +573,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -600,10 +589,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -630,7 +621,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -642,101 +633,102 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -756,10 +748,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -779,10 +771,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -802,10 +794,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -825,9 +817,9 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -903,7 +895,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -921,7 +913,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -940,22 +932,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -974,7 +966,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -993,7 +985,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1013,7 +1005,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1030,9 +1022,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1044,7 +1035,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1067,14 +1058,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1094,7 +1085,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1115,11 +1106,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -1128,25 +1119,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1165,7 +1156,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1204,7 +1195,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1219,24 +1212,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1253,9 +1231,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1272,56 +1249,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -1337,8 +1284,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1355,16 +1302,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -1377,9 +1328,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1396,6 +1364,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -1403,26 +1376,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -1465,7 +1441,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -1501,7 +1481,7 @@ type Random_data = struct {
Frand_sep int32
F__ccgo_pad1 [4]byte
Fend_ptr uintptr
-} /* stdlib.h:423:1 */
+} /* stdlib.h:543:1 */
// Data structure for communication with thread safe versions. This
//
@@ -1513,13 +1493,13 @@ type Drand48_data = struct {
F__c uint16
F__init uint16
F__a uint64
-} /* stdlib.h:490:1 */
+} /* stdlib.h:610:1 */
// Shorthand for type of comparison functions.
-type X__compar_fn_t = uintptr /* stdlib.h:808:13 */
+type X__compar_fn_t = uintptr /* stdlib.h:948:13 */
// Floating-point inline functions for stdlib.h.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// Copyright (C) 2012-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1538,4 +1518,22 @@ type X__compar_fn_t = uintptr /* stdlib.h:808:13 */
// Define some macros helping to catch buffer overflows.
+// Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_mips64le.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_mips64le.go
new file mode 100644
index 000000000..242876b7e
--- /dev/null
+++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_mips64le.go
@@ -0,0 +1,1541 @@
+// 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_linux_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 (
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ EXIT_FAILURE = 1 // stdlib.h:91:1:
+ EXIT_SUCCESS = 0 // stdlib.h:92:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ RAND_MAX = 2147483647 // stdlib.h:86:1:
+ WCONTINUED = 8 // waitflags.h:32:1:
+ WEXITED = 4 // waitflags.h:31:1:
+ WNOHANG = 1 // waitflags.h:25:1:
+ WNOWAIT = 0x01000000 // waitflags.h:33:1:
+ WSTOPPED = 2 // waitflags.h:30:1:
+ WUNTRACED = 2 // waitflags.h:26:1:
+ X_ALLOCA_H = 1 // alloca.h:19:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_FLOATN_COMMON_H = 0 // floatn-common.h:21:1:
+ X_BITS_FLOATN_H = 0 // floatn.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_GCC_WCHAR_T = 0 // stddef.h:273:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STDLIB_H = 1 // stdlib.h:35:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ X_T_WCHAR = 0 // stddef.h:264:1:
+ X_T_WCHAR_ = 0 // stddef.h:263:1:
+ X_WCHAR_T = 0 // stddef.h:262:1:
+ X_WCHAR_T_ = 0 // stddef.h:266:1:
+ X_WCHAR_T_DECLARED = 0 // stddef.h:274:1:
+ X_WCHAR_T_DEFINED = 0 // stddef.h:269:1:
+ X_WCHAR_T_DEFINED_ = 0 // stddef.h:268:1:
+ X_WCHAR_T_H = 0 // stddef.h:270:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// A null pointer constant.
+
+// XPG requires a few symbols from <sys/wait.h> being defined.
+// Definitions of flag bits for `waitpid' et al.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bits in the third argument to `waitpid'.
+
+// Bits in the fourth argument to `waitid'.
+
+// The following values are used by the `waitid' function.
+
+// The Linux kernel defines these bare, rather than an enum,
+// which causes a conflict if the include order is reversed.
+
+const ( /* waitflags.h:52:1: */
+ P_ALL = 0 // Wait for any child.
+ P_PID = 1 // Wait for specified process.
+ P_PGID = 2
+)
+
+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 */
+
+// A null pointer constant.
+
+// XPG requires a few symbols from <sys/wait.h> being defined.
+// Definitions of flag bits for `waitpid' et al.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bits in the third argument to `waitpid'.
+
+// Bits in the fourth argument to `waitid'.
+
+// The following values are used by the `waitid' function.
+
+// The Linux kernel defines these bare, rather than an enum,
+// which causes a conflict if the include order is reversed.
+
+type Idtype_t = uint32 /* waitflags.h:57:3 */
+// Definitions of status bits for `wait' et al.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Everything extant so far uses these same bits.
+
+// If WIFEXITED(STATUS), the low-order 8 bits of the status.
+
+// If WIFSIGNALED(STATUS), the terminating signal.
+
+// If WIFSTOPPED(STATUS), the signal that stopped the child.
+
+// Nonzero if STATUS indicates normal termination.
+
+// Nonzero if STATUS indicates termination by a signal.
+
+// Nonzero if STATUS indicates the child is stopped.
+
+// Nonzero if STATUS indicates the child continued after a stop. We only
+// define this if <bits/waitflags.h> provides the WCONTINUED flag bit.
+
+// Nonzero if STATUS indicates the child dumped core.
+
+// Macros for constructing status values.
+
+// Define the macros <sys/wait.h> also would define this way.
+
+// _FloatN API tests for enablement.
+// Macros to control TS 18661-3 glibc features on x86.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Defined to 1 if the current compiler invocation provides a
+// floating-point type with the IEEE 754 binary128 format, and this
+// glibc includes corresponding *f128 interfaces for it. The required
+// libgcc support was added some time after the basic compiler
+// support, for x86_64 and x86.
+
+// Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
+// from the default float, double and long double types in this glibc.
+
+// Defined to 1 if the current compiler invocation provides a
+// floating-point type with the right format for _Float64x, and this
+// glibc includes corresponding *f64x interfaces for it.
+
+// Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
+// of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
+// the format of _Float128, which must be different from that of long
+// double.
+
+// Defined to concatenate the literal suffix to be used with _Float128
+// types, if __HAVE_FLOAT128 is 1.
+
+// Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+
+// The remaining of this file provides support for older compilers.
+
+// The type _Float128 exists only since GCC 7.0.
+
+// __builtin_huge_valf128 doesn't exist before GCC 7.0.
+
+// Older GCC has only a subset of built-in functions for _Float128 on
+// x86, and __builtin_infq is not usable in static initializers.
+// Converting a narrower sNaN to _Float128 produces a quiet NaN, so
+// attempts to use _Float128 sNaNs will not work properly with older
+// compilers.
+
+// In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
+// e.g.: __builtin_signbitf128, before GCC 6. However, there has never
+// been a __builtin_signbitf128 in GCC and the type-generic builtin is
+// only available since GCC 6.
+
+// Macros to control TS 18661-3 glibc features where the same
+// definitions are appropriate for all platforms.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// This header should be included at the bottom of each bits/floatn.h.
+// It defines the following macros for each _FloatN and _FloatNx type,
+// where the same definitions, or definitions based only on the macros
+// in bits/floatn.h, are appropriate for all glibc configurations.
+
+// Defined to 1 if the current compiler invocation provides a
+// floating-point type with the right format for this type, and this
+// glibc includes corresponding *fN or *fNx interfaces for it.
+
+// Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
+// type is the first with its format in the sequence of (the default
+// choices for) float, double, long double, _Float16, _Float32,
+// _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
+// glibc; that is, if functions present once per floating-point format
+// rather than once per type are present for this type.
+//
+// All configurations supported by glibc have _Float32 the same format
+// as float, _Float64 and _Float32x the same format as double, the
+// _Float64x the same format as either long double or _Float128. No
+// configurations support _Float128x or, as of GCC 7, have compiler
+// support for a type meeting the requirements for _Float128x.
+
+// Defined to 1 if the corresponding _FloatN type is not binary compatible
+// with the corresponding ISO C type in the current compilation unit as
+// opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
+// in glibc.
+
+// Defined to 1 if any _FloatN or _FloatNx types that are not
+// ABI-distinct are however distinct types at the C language level (so
+// for the purposes of __builtin_types_compatible_p and _Generic).
+
+// Defined to concatenate the literal suffix to be used with _FloatN
+// or _FloatNx types, if __HAVE_<type> is 1. The corresponding
+// literal suffixes exist since GCC 7, for C only.
+
+// Defined to a complex type if __HAVE_<type> is 1.
+
+// The remaining of this file provides support for older compilers.
+
+// If double, long double and _Float64 all have the same set of
+// values, TS 18661-3 requires the usual arithmetic conversions on
+// long double and _Float64 to produce _Float64. For this to be the
+// case when building with a compiler without a distinct _Float64
+// type, _Float64 must be a typedef for long double, not for
+// double.
+
+// Returned by `div'.
+type Div_t = struct {
+ Fquot int32
+ Frem int32
+} /* stdlib.h:62:5 */
+
+// Returned by `ldiv'.
+type Ldiv_t = struct {
+ Fquot int64
+ Frem int64
+} /* stdlib.h:70:5 */
+
+// Returned by `lldiv'.
+type Lldiv_t = struct {
+ Fquot int64
+ Frem int64
+} /* stdlib.h:80:5 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Reentrant versions of the `random' family of functions.
+// These functions all use the following data structure to contain
+// state, rather than global state variables.
+
+type Random_data = struct {
+ Ffptr uintptr
+ Frptr uintptr
+ Fstate uintptr
+ Frand_type int32
+ Frand_deg int32
+ Frand_sep int32
+ F__ccgo_pad1 [4]byte
+ Fend_ptr uintptr
+} /* 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 Drand48_data = struct {
+ F__x [3]uint16
+ F__old_x [3]uint16
+ F__c uint16
+ F__init uint16
+ F__a uint64
+} /* stdlib.h:490:1 */
+
+// Shorthand for type of comparison functions.
+type X__compar_fn_t = uintptr /* stdlib.h:808:13 */
+
+// Floating-point inline functions for stdlib.h.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define some macros helping to catch buffer overflows.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/straceoff.go b/vendor/modernc.org/libc/straceoff.go
new file mode 100644
index 000000000..f955d54b0
--- /dev/null
+++ b/vendor/modernc.org/libc/straceoff.go
@@ -0,0 +1,10 @@
+// Copyright 2023 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.
+
+//go:build !libc.strace
+// +build !libc.strace
+
+package libc // import "modernc.org/libc"
+
+const __ccgo_strace = false
diff --git a/vendor/modernc.org/libc/straceon.go b/vendor/modernc.org/libc/straceon.go
new file mode 100644
index 000000000..ac8c73fb8
--- /dev/null
+++ b/vendor/modernc.org/libc/straceon.go
@@ -0,0 +1,10 @@
+// Copyright 2023 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.
+
+//go:build libc.strace
+// +build libc.strace
+
+package libc // import "modernc.org/libc"
+
+const __ccgo_strace = true
diff --git a/vendor/modernc.org/libc/sync.go b/vendor/modernc.org/libc/sync.go
index f4f91f6c7..28f2bb4b0 100644
--- a/vendor/modernc.org/libc/sync.go
+++ b/vendor/modernc.org/libc/sync.go
@@ -12,6 +12,9 @@ var __sync_synchronize_dummy int32
// __sync_synchronize();
func X__sync_synchronize(t *TLS) {
+ if __ccgo_strace {
+ trc("t=%v, (%v:)", t, origin(2))
+ }
// Attempt to implement a full memory barrier without assembler.
atomic.StoreInt32(&__sync_synchronize_dummy, atomic.LoadInt32(&__sync_synchronize_dummy)+1)
}
diff --git a/vendor/modernc.org/libc/sys/socket/capi_illumos_amd64.go b/vendor/modernc.org/libc/sys/socket/capi_illumos_amd64.go
new file mode 100644
index 000000000..442b88933
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/socket/capi_illumos_amd64.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_illumos_amd64.go -pkgname socket', DO NOT EDIT.
+
+package socket
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go
index 41ea29c81..a632f73f5 100644
--- a/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.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 -ignore-unsupported-alignment -o sys/socket/socket_linux_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_linux_loong64.go -pkgname socket', DO NOT EDIT.
package socket
diff --git a/vendor/modernc.org/libc/sys/socket/capi_linux_mips64le.go b/vendor/modernc.org/libc/sys/socket/capi_linux_mips64le.go
new file mode 100644
index 000000000..41ea29c81
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/socket/capi_linux_mips64le.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_linux_amd64.go -pkgname socket', DO NOT EDIT.
+
+package socket
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go
new file mode 100644
index 000000000..44d1ed442
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go
@@ -0,0 +1,5226 @@
+// 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_illumos_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_802 = 18 // socket.h:296:1:
+ AF_APPLETALK = 16 // socket.h:294:1:
+ AF_CCITT = 10 // socket.h:288:1:
+ AF_CHAOS = 5 // socket.h:283:1:
+ AF_DATAKIT = 9 // socket.h:287:1:
+ AF_DECnet = 12 // socket.h:290:1:
+ AF_DLI = 13 // socket.h:291:1:
+ AF_ECMA = 8 // socket.h:286:1:
+ AF_FILE = 1 // socket.h:279:1:
+ AF_GOSIP = 22 // socket.h:300:1:
+ AF_HYLINK = 15 // socket.h:293:1:
+ AF_IMPLINK = 3 // socket.h:281:1:
+ AF_INET = 2 // socket.h:280:1:
+ AF_INET6 = 26 // socket.h:304:1:
+ AF_INET_OFFLOAD = 30 // socket.h:308:1:
+ AF_IPX = 23 // socket.h:301:1:
+ AF_KEY = 27 // socket.h:305:1:
+ AF_LAT = 14 // socket.h:292:1:
+ AF_LINK = 25 // socket.h:303:1:
+ AF_LOCAL = 1 // socket.h:278:1:
+ AF_LX_NETLINK = 33 // socket.h:311:1:
+ AF_MAX = 33 // socket.h:313:1:
+ AF_NBS = 7 // socket.h:285:1:
+ AF_NCA = 28 // socket.h:306:1:
+ AF_NIT = 17 // socket.h:295:1:
+ AF_NS = 6 // socket.h:284:1:
+ AF_OSI = 19 // socket.h:297:1:
+ AF_OSINET = 21 // socket.h:299:1:
+ AF_PACKET = 32 // socket.h:310:1:
+ AF_POLICY = 29 // socket.h:307:1:
+ AF_PUP = 4 // socket.h:282:1:
+ AF_ROUTE = 24 // socket.h:302:1:
+ AF_SNA = 11 // socket.h:289:1:
+ AF_TRILL = 31 // socket.h:309:1:
+ AF_UNIX = 1 // socket.h:277:1:
+ AF_UNSPEC = 0 // socket.h:276:1:
+ AF_X25 = 20 // socket.h:298:1:
+ CANBSIZ = 256 // param.h:91:1:
+ CDLIMIT = 2048 // param.h:164:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ CMASK = 022 // param.h:163:1:
+ DEFAULT_JUMPPID = 0 // param.h:120:1:
+ DEFAULT_MAXPID = 30000 // param.h:119:1:
+ DEV_BSHIFT = 9 // param.h:251:1:
+ DEV_BSIZE = 512 // param.h:250:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FILF_AUTO = 0x2 // socket.h:232:1:
+ FILF_BYPASS = 0x4 // socket.h:233:1:
+ FILF_PROG = 0x1 // socket.h:231:1:
+ FILNAME_MAX = 32 // socket.h:221:1:
+ FIL_ATTACH = 0x1 // socket.h:217:1:
+ FIL_DETACH = 0x2 // socket.h:218:1:
+ FIL_LIST = 0x3 // socket.h:219:1:
+ FSCALE = 256 // param.h:304:1:
+ FSHIFT = 8 // param.h:303:1:
+ GID_NETADM = 65 // param.h:100:1:
+ GID_NOBODY = 60001 // param.h:95:1:
+ GID_UNKNOWN = 96 // param.h:97:1:
+ IMPLINK_HIGHEXPER = 158 // in.h:284:1:
+ IMPLINK_IP = 155 // in.h:282:1:
+ IMPLINK_LOWEXPER = 156 // in.h:283:1:
+ INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1:
+ INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1:
+ INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1:
+ INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1:
+ INADDR_ANY = 0x00000000 // in.h:366:1:
+ INADDR_BROADCAST = 0xffffffff // in.h:368:1:
+ INADDR_LOOPBACK = 0x7F000001 // in.h:367:1:
+ INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1:
+ INADDR_NONE = 0xffffffff // in.h:369:1:
+ INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1:
+ INET6_ADDRSTRLEN = 46 // in.h:1212:1:
+ INET_ADDRSTRLEN = 16 // in.h:1210:1:
+ IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1:
+ IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1:
+ IN_CLASSA_HOST = 0x00ffffff // in.h:332:1:
+ IN_CLASSA_MAX = 128 // in.h:333:1:
+ IN_CLASSA_NET = 0xff000000 // in.h:330:1:
+ IN_CLASSA_NSHIFT = 24 // in.h:331:1:
+ IN_CLASSB_HOST = 0x0000ffff // in.h:338:1:
+ IN_CLASSB_MAX = 65536 // in.h:339:1:
+ IN_CLASSB_NET = 0xffff0000 // in.h:336:1:
+ IN_CLASSB_NSHIFT = 16 // in.h:337:1:
+ IN_CLASSC_HOST = 0x000000ff // in.h:344:1:
+ IN_CLASSC_NET = 0xffffff00 // in.h:342:1:
+ IN_CLASSC_NSHIFT = 8 // in.h:343:1:
+ IN_CLASSD_HOST = 0x0fffffff // in.h:349:1:
+ IN_CLASSD_NET = 0xf0000000 // in.h:347:1:
+ IN_CLASSD_NSHIFT = 28 // in.h:348:1:
+ IN_CLASSE_NET = 0xffffffff // in.h:352:1:
+ IN_LOOPBACKNET = 127 // in.h:395:1:
+ IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1:
+ IN_PRIVATE12_NET = 0xac100000 // in.h:382:1:
+ IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1:
+ IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1:
+ IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1:
+ IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1:
+ IPPORT_BIFFUDP = 512 // in.h:250:1:
+ IPPORT_BOOTPC = 68 // in.h:214:1:
+ IPPORT_BOOTPS = 67 // in.h:213:1:
+ IPPORT_CHARGEN = 19 // in.h:199:1:
+ IPPORT_CMDSERVER = 514 // in.h:243:1:
+ IPPORT_DAYTIME = 13 // in.h:197:1:
+ IPPORT_DHCPV6C = 546 // in.h:260:1:
+ IPPORT_DHCPV6S = 547 // in.h:261:1:
+ IPPORT_DISCARD = 9 // in.h:195:1:
+ IPPORT_DOMAIN = 53 // in.h:206:1:
+ IPPORT_ECHO = 7 // in.h:194:1:
+ IPPORT_EFSSERVER = 520 // in.h:245:1:
+ IPPORT_EXECSERVER = 512 // in.h:241:1:
+ IPPORT_FINGER = 79 // in.h:217:1:
+ IPPORT_FTP = 21 // in.h:200:1:
+ IPPORT_HTTP = 80 // in.h:218:1:
+ IPPORT_HTTP_ALT = 8080 // in.h:219:1:
+ IPPORT_IKE = 500 // in.h:235:1:
+ IPPORT_IKE_NATT = 4500 // in.h:236:1:
+ IPPORT_LDAP = 389 // in.h:226:1:
+ IPPORT_LOGINSERVER = 513 // in.h:242:1:
+ IPPORT_MDNS = 5353 // in.h:207:1:
+ IPPORT_MIP = 434 // in.h:228:1:
+ IPPORT_MTP = 57 // in.h:208:1:
+ IPPORT_NAMESERVER = 42 // in.h:204:1:
+ IPPORT_NETBIOS_DGM = 138 // in.h:224:1:
+ IPPORT_NETBIOS_NS = 137 // in.h:223:1:
+ IPPORT_NETBIOS_SSN = 139 // in.h:225:1:
+ IPPORT_NETSTAT = 15 // in.h:198:1:
+ IPPORT_NTP = 123 // in.h:222:1:
+ IPPORT_PRINTER = 515 // in.h:244:1:
+ IPPORT_RESERVED = 1024 // in.h:271:1:
+ IPPORT_RIPNG = 521 // in.h:255:1:
+ IPPORT_RJE = 77 // in.h:216:1:
+ IPPORT_ROUTESERVER = 520 // in.h:254:1:
+ IPPORT_SLP = 427 // in.h:227:1:
+ IPPORT_SMB = 445 // in.h:229:1:
+ IPPORT_SMTP = 25 // in.h:202:1:
+ IPPORT_SOCKS = 1080 // in.h:263:1:
+ IPPORT_SUPDUP = 95 // in.h:221:1:
+ IPPORT_SYSLOG = 514 // in.h:252:1:
+ IPPORT_SYSTAT = 11 // in.h:196:1:
+ IPPORT_TALK = 517 // in.h:253:1:
+ IPPORT_TELNET = 23 // in.h:201:1:
+ IPPORT_TFTP = 69 // in.h:215:1:
+ IPPORT_TIMESERVER = 37 // in.h:203:1:
+ IPPORT_TTYLINK = 87 // in.h:220:1:
+ IPPORT_USERRESERVED = 5000 // in.h:272:1:
+ IPPORT_VXLAN = 4789 // in.h:230:1:
+ IPPORT_WHOIS = 43 // in.h:205:1:
+ IPPORT_WHOSERVER = 513 // in.h:251:1:
+ IPPROTO_AH = 51 // in.h:169:1:
+ IPPROTO_DSTOPTS = 60 // in.h:172:1:
+ IPPROTO_EGP = 8 // in.h:160:1:
+ IPPROTO_ENCAP = 4 // in.h:158:1:
+ IPPROTO_EON = 80 // in.h:175:1:
+ IPPROTO_ESP = 50 // in.h:168:1:
+ IPPROTO_FRAGMENT = 44 // in.h:166:1:
+ IPPROTO_GGP = 3 // in.h:157:1:
+ IPPROTO_HELLO = 63 // in.h:173:1:
+ IPPROTO_HOPOPTS = 0 // in.h:154:1:
+ IPPROTO_ICMP = 1 // in.h:155:1:
+ IPPROTO_ICMPV6 = 58 // in.h:170:1:
+ IPPROTO_IDP = 22 // in.h:163:1:
+ IPPROTO_IGMP = 2 // in.h:156:1:
+ IPPROTO_IP = 0 // in.h:153:1:
+ IPPROTO_IPV6 = 41 // in.h:164:1:
+ IPPROTO_MAX = 256 // in.h:182:1:
+ IPPROTO_ND = 77 // in.h:174:1:
+ IPPROTO_NONE = 59 // in.h:171:1:
+ IPPROTO_OSPF = 89 // in.h:176:1:
+ IPPROTO_PIM = 103 // in.h:177:1:
+ IPPROTO_PUP = 12 // in.h:161:1:
+ IPPROTO_RAW = 255 // in.h:181:1:
+ IPPROTO_ROUTING = 43 // in.h:165:1:
+ IPPROTO_RSVP = 46 // in.h:167:1:
+ IPPROTO_SCTP = 132 // in.h:178:1:
+ IPPROTO_TCP = 6 // in.h:159:1:
+ IPPROTO_UDP = 17 // in.h:162:1:
+ IPSEC_PREF_NEVER = 0x01 // in.h:941:1:
+ IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1:
+ IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1:
+ IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1:
+ IPV6_BOUND_IF = 0x41 // in.h:1307:1:
+ IPV6_CHECKSUM = 0x18 // in.h:1257:1:
+ IPV6_DONTFRAG = 0x21 // in.h:1260:1:
+ IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1:
+ IPV6_DSTOPTS = 0xf // in.h:1234:1:
+ IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1:
+ IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1:
+ IPV6_HOPLIMIT = 0xc // in.h:1231:1:
+ IPV6_HOPOPTS = 0xe // in.h:1233:1:
+ IPV6_JOIN_GROUP = 0x9 // in.h:1202:1:
+ IPV6_LEAVE_GROUP = 0xa // in.h:1204:1:
+ IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1:
+ IPV6_MULTICAST_IF = 0x6 // in.h:1193:1:
+ IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1:
+ IPV6_NEXTHOP = 0xd // in.h:1232:1:
+ IPV6_PAD1_OPT = 0 // in.h:1314:1:
+ IPV6_PATHMTU = 0x25 // in.h:1264:1:
+ IPV6_PKTINFO = 0xb // in.h:1229:1:
+ IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1:
+ IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1:
+ IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1:
+ IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1:
+ IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1:
+ IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1:
+ IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1:
+ IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1:
+ IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1:
+ IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1:
+ IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1:
+ IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1:
+ IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1:
+ IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1:
+ IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1:
+ IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1:
+ IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1:
+ IPV6_RECVPATHMTU = 0x24 // in.h:1263:1:
+ IPV6_RECVPKTINFO = 0x12 // in.h:1239:1:
+ IPV6_RECVRTHDR = 0x16 // in.h:1249:1:
+ IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1:
+ IPV6_RECVTCLASS = 0x19 // in.h:1258:1:
+ IPV6_RTHDR = 0x10 // in.h:1236:1:
+ IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1:
+ IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1:
+ IPV6_SEC_OPT = 0x22 // in.h:1261:1:
+ IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1:
+ IPV6_TCLASS = 0x26 // in.h:1265:1:
+ IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1:
+ IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1:
+ IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1:
+ IPV6_V6ONLY = 0x27 // in.h:1266:1:
+ IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1:
+ IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1:
+ IP_BLOCK_SOURCE = 0x15 // in.h:923:1:
+ IP_BOUND_IF = 0x41 // in.h:976:1:
+ IP_BROADCAST = 0x106 // in.h:994:1:
+ IP_BROADCAST_TTL = 0x43 // in.h:978:1:
+ IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1:
+ IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1:
+ IP_DHCPINIT_IF = 0x45 // in.h:980:1:
+ IP_DONTFRAG = 0x1b // in.h:934:1:
+ IP_DONTROUTE = 0x105 // in.h:990:1:
+ IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1:
+ IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1:
+ IP_HDRINCL = 2 // in.h:899:1:
+ IP_MULTICAST_IF = 0x10 // in.h:918:1:
+ IP_MULTICAST_LOOP = 0x12 // in.h:920:1:
+ IP_MULTICAST_TTL = 0x11 // in.h:919:1:
+ IP_NEXTHOP = 0x19 // in.h:927:1:
+ IP_OPTIONS = 1 // in.h:896:1:
+ IP_PKTINFO = 0x1a // in.h:932:1:
+ IP_RECVDSTADDR = 0x7 // in.h:911:1:
+ IP_RECVIF = 0x9 // in.h:913:1:
+ IP_RECVOPTS = 0x5 // in.h:909:1:
+ IP_RECVPKTINFO = 0x1a // in.h:933:1:
+ IP_RECVRETOPTS = 0x6 // in.h:910:1:
+ IP_RECVSLLA = 0xa // in.h:914:1:
+ IP_RECVTOS = 0xc // in.h:916:1:
+ IP_RECVTTL = 0xb // in.h:915:1:
+ IP_RETOPTS = 0x8 // in.h:912:1:
+ IP_REUSEADDR = 0x104 // in.h:986:1:
+ IP_SEC_OPT = 0x22 // in.h:940:1:
+ IP_TOS = 3 // in.h:902:1:
+ IP_TTL = 4 // in.h:906:1:
+ IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1:
+ IP_UNSPEC_SRC = 0x42 // in.h:977:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1:
+ LINUX_SLL_HOST = 0 // socket_impl.h:121:1:
+ LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1:
+ LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1:
+ LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1:
+ MAXBSIZE = 8192 // param.h:249:1:
+ MAXFRAG = 8 // param.h:252:1:
+ MAXLINK = 32767 // param.h:126:1:
+ MAXLINKNAMELEN = 32 // param.h:209:1:
+ MAXNAMELEN = 256 // param.h:202:1:
+ MAXOFFSET_T = 0x7fffffffffffffff // param.h:258:1:
+ MAXOFF_T = 0x7fffffffffffffff // param.h:257:1:
+ MAXPATHLEN = 1024 // param.h:199:1:
+ MAXPROJID = 2147483647 // param.h:125:1:
+ MAXSYMLINKS = 20 // param.h:201:1:
+ MAXUID = 2147483647 // param.h:123:1:
+ MAX_CANON = 256 // param.h:89:1:
+ MAX_INPUT = 512 // param.h:86:1:
+ MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1:
+ MCAST_EXCLUDE = 2 // in.h:1122:1:
+ MCAST_INCLUDE = 1 // in.h:1121:1:
+ MCAST_JOIN_GROUP = 0x29 // in.h:1276:1:
+ MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1:
+ MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1:
+ MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1:
+ MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ MINEPHUID = 0x80000000 // param.h:128:1:
+ MSG_CTRUNC = 0x10 // socket.h:429:1:
+ MSG_DONTROUTE = 0x4 // socket.h:427:1:
+ MSG_DONTWAIT = 0x80 // socket.h:432:1:
+ MSG_DUPCTRL = 0x800 // socket.h:435:1:
+ MSG_EOR = 0x8 // socket.h:428:1:
+ MSG_MAXIOVLEN = 16 // socket.h:440:1:
+ MSG_NOSIGNAL = 0x200 // socket.h:434:1:
+ MSG_NOTIFICATION = 0x100 // socket.h:433:1:
+ MSG_OOB = 0x1 // socket.h:425:1:
+ MSG_PEEK = 0x2 // socket.h:426:1:
+ MSG_TRUNC = 0x20 // socket.h:430:1:
+ MSG_WAITALL = 0x40 // socket.h:431:1:
+ MSG_XPG4_2 = 0x8000 // socket.h:437:1:
+ NADDR = 13 // param.h:212:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ NBPS = 0x20000 // param.h:165:1:
+ NBPSCTR = 512 // param.h:166:1:
+ NCARGS = 2097152 // param.h:294:1:
+ NCARGS32 = 0x100000 // param.h:291:1:
+ NCARGS64 = 0x200000 // param.h:292:1:
+ NC_APPLETALK = "appletalk" // netconfig.h:108:1:
+ NC_BROADCAST = 02 // netconfig.h:85:1:
+ NC_CCITT = "ccitt" // netconfig.h:102:1:
+ NC_CHAOS = "chaos" // netconfig.h:97:1:
+ NC_DATAKIT = "datakit" // netconfig.h:101:1:
+ NC_DECNET = "decnet" // netconfig.h:104:1:
+ NC_DLI = "dli" // netconfig.h:105:1:
+ NC_ECMA = "ecma" // netconfig.h:100:1:
+ NC_GOSIP = "gosip" // netconfig.h:114:1:
+ NC_HYLINK = "hylink" // netconfig.h:107:1:
+ NC_IBTF = "ibtf" // netconfig.h:138:1:
+ NC_ICMP = "icmp" // netconfig.h:132:1:
+ NC_IEEE802 = "ieee802" // netconfig.h:110:1:
+ NC_IMPLINK = "implink" // netconfig.h:95:1:
+ NC_INET = "inet" // netconfig.h:93:1:
+ NC_INET6 = "inet6" // netconfig.h:94:1:
+ NC_KDAPL = "kdapl" // netconfig.h:139:1:
+ NC_KVIPL = "kvipl" // netconfig.h:137:1:
+ NC_LAT = "lat" // netconfig.h:106:1:
+ NC_LOOPBACK = "loopback" // netconfig.h:92:1:
+ NC_NBS = "nbs" // netconfig.h:99:1:
+ NC_NIT = "nit" // netconfig.h:109:1:
+ NC_NOFLAG = 00 // netconfig.h:83:1:
+ NC_NOPROTO = "-" // netconfig.h:129:1:
+ NC_NOPROTOFMLY = "-" // netconfig.h:91:1:
+ NC_NS = "ns" // netconfig.h:98:1:
+ NC_OSI = "osi" // netconfig.h:111:1:
+ NC_OSINET = "osinet" // netconfig.h:113:1:
+ NC_PUP = "pup" // netconfig.h:96:1:
+ NC_RDMA = "rdma" // netconfig.h:123:1:
+ NC_SNA = "sna" // netconfig.h:103:1:
+ NC_TCP = "tcp" // netconfig.h:130:1:
+ NC_TPI_CLTS = 1 // netconfig.h:65:1:
+ NC_TPI_COTS = 2 // netconfig.h:66:1:
+ NC_TPI_COTS_ORD = 3 // netconfig.h:67:1:
+ NC_TPI_RAW = 4 // netconfig.h:68:1:
+ NC_TPI_RDMA = 5 // netconfig.h:77:1:
+ NC_UDP = "udp" // netconfig.h:131:1:
+ NC_VISIBLE = 01 // netconfig.h:84:1:
+ NC_X25 = "x25" // netconfig.h:112:1:
+ NETCONFIG = "/etc/netconfig" // netconfig.h:41:1:
+ NETPATH = "NETPATH" // netconfig.h:42:1:
+ NGROUPS_MAX_DEFAULT = 16 // param.h:148:1:
+ NGROUPS_OLDMAX = 32 // param.h:143:1:
+ NGROUPS_UMAX = 1024 // param.h:142:1:
+ NGROUPS_UMIN = 0 // param.h:141:1:
+ NMOUNT = 40 // param.h:130:1:
+ NOFILE = 20 // param.h:132:1:
+ NZERO = 20 // param.h:153:1:
+ PF_802 = 18 // socket.h:338:1:
+ PF_APPLETALK = 16 // socket.h:336:1:
+ PF_CCITT = 10 // socket.h:330:1:
+ PF_CHAOS = 5 // socket.h:325:1:
+ PF_DATAKIT = 9 // socket.h:329:1:
+ PF_DECnet = 12 // socket.h:332:1:
+ PF_DLI = 13 // socket.h:333:1:
+ PF_ECMA = 8 // socket.h:328:1:
+ PF_FILE = 1 // socket.h:321:1:
+ PF_GOSIP = 22 // socket.h:342:1:
+ PF_HYLINK = 15 // socket.h:335:1:
+ PF_IMPLINK = 3 // socket.h:323:1:
+ PF_INET = 2 // socket.h:322:1:
+ PF_INET6 = 26 // socket.h:346:1:
+ PF_INET_OFFLOAD = 30 // socket.h:350:1:
+ PF_IPX = 23 // socket.h:343:1:
+ PF_KEY = 27 // socket.h:347:1:
+ PF_LAT = 14 // socket.h:334:1:
+ PF_LINK = 25 // socket.h:345:1:
+ PF_LOCAL = 1 // socket.h:320:1:
+ PF_LX_NETLINK = 33 // socket.h:353:1:
+ PF_MAX = 33 // socket.h:355:1:
+ PF_NBS = 7 // socket.h:327:1:
+ PF_NCA = 28 // socket.h:348:1:
+ PF_NIT = 17 // socket.h:337:1:
+ PF_NS = 6 // socket.h:326:1:
+ PF_OSI = 19 // socket.h:339:1:
+ PF_OSINET = 21 // socket.h:341:1:
+ PF_PACKET = 32 // socket.h:352:1:
+ PF_POLICY = 29 // socket.h:349:1:
+ PF_PUP = 4 // socket.h:324:1:
+ PF_ROUTE = 24 // socket.h:344:1:
+ PF_SNA = 11 // socket.h:331:1:
+ PF_TRILL = 31 // socket.h:351:1:
+ PF_UNIX = 1 // socket.h:319:1:
+ PF_UNSPEC = 0 // socket.h:318:1:
+ PF_X25 = 20 // socket.h:340:1:
+ PIPE_BUF = 5120 // param.h:221:1:
+ PIPE_MAX = 5120 // param.h:225:1:
+ POLLERR = 0x0008 // poll.h:74:1:
+ POLLET = 0x2000 // poll.h:84:1:
+ POLLHUP = 0x0010 // poll.h:75:1:
+ POLLIN = 0x0001 // poll.h:59:1:
+ POLLNORM = 64 // poll.h:68:1:
+ POLLNVAL = 0x0020 // poll.h:76:1:
+ POLLONESHOT = 0x1000 // poll.h:83:1:
+ POLLOUT = 0x0004 // poll.h:61:1:
+ POLLPRI = 0x0002 // poll.h:60:1:
+ POLLRDBAND = 0x0080 // poll.h:64:1:
+ POLLRDHUP = 0x4000 // poll.h:66:1:
+ POLLRDNORM = 0x0040 // poll.h:62:1:
+ POLLREMOVE = 0x0800 // poll.h:82:1:
+ POLLWRBAND = 0x0100 // poll.h:65:1:
+ POLLWRNORM = 4 // poll.h:63:1:
+ PREMOTE = 39 // param.h:185:1:
+ PROTO_SDP = 257 // in.h:185:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SCM_RIGHTS = 0x1010 // socket.h:197:1:
+ SCM_TIMESTAMP = 4115 // socket.h:201:1:
+ SCM_UCRED = 0x1012 // socket.h:199:1:
+ SCTRSHFT = 9 // param.h:168:1:
+ SEC = 1 // time.h:244:1:
+ SHUT_RD = 0 // socket.h:458:1:
+ SHUT_RDWR = 2 // socket.h:460:1:
+ SHUT_WR = 1 // socket.h:459:1:
+ SOCK_CLOEXEC = 0x080000 // socket.h:127:1:
+ SOCK_DGRAM = 1 // socket.h:113:1:
+ SOCK_NDELAY = 0x200000 // socket.h:129:1:
+ SOCK_NONBLOCK = 0x100000 // socket.h:128:1:
+ SOCK_RAW = 4 // socket.h:114:1:
+ SOCK_RDM = 5 // socket.h:120:1:
+ SOCK_SEQPACKET = 6 // socket.h:121:1:
+ SOCK_STREAM = 2 // socket.h:112:1:
+ SOCK_TYPE_MASK = 0xffff // socket.h:122:1:
+ SOL_FILTER = 0xfffc // socket.h:267:1:
+ SOL_PACKET = 0xfffd // socket.h:266:1:
+ SOL_ROUTE = 0xfffe // socket.h:264:1:
+ SOL_SOCKET = 0xffff // socket.h:262:1:
+ SOMAXCONN = 128 // socket.h:360:1:
+ SO_ACCEPTCONN = 0x0002 // socket.h:135:1:
+ SO_ALLZONES = 0x1014 // socket.h:202:1:
+ SO_ANON_MLP = 0x100a // socket.h:191:1:
+ SO_ATTACH_FILTER = 0x40000001 // socket.h:157:1:
+ SO_BROADCAST = 0x0020 // socket.h:139:1:
+ SO_DEBUG = 0x0001 // socket.h:134:1:
+ SO_DETACH_FILTER = 0x40000002 // socket.h:158:1:
+ SO_DGRAM_ERRIND = 0x0200 // socket.h:143:1:
+ SO_DOMAIN = 0x100c // socket.h:193:1:
+ SO_DONTLINGER = -129 // socket.h:177:1:
+ SO_DONTROUTE = 0x0010 // socket.h:138:1:
+ SO_ERROR = 0x1007 // socket.h:188:1:
+ SO_EXCLBIND = 0x1015 // socket.h:203:1:
+ SO_KEEPALIVE = 0x0008 // socket.h:137:1:
+ SO_LINGER = 0x0080 // socket.h:141:1:
+ SO_MAC_EXEMPT = 0x100b // socket.h:192:1:
+ SO_MAC_IMPLICIT = 0x1016 // socket.h:204:1:
+ SO_OOBINLINE = 0x0100 // socket.h:142:1:
+ SO_PROTOTYPE = 0x1009 // socket.h:190:1:
+ SO_RCVBUF = 0x1002 // socket.h:183:1:
+ SO_RCVLOWAT = 0x1004 // socket.h:185:1:
+ SO_RCVPSH = 0x100d // socket.h:194:1:
+ SO_RCVTIMEO = 0x1006 // socket.h:187:1:
+ SO_RECVUCRED = 0x0400 // socket.h:144:1:
+ SO_REUSEADDR = 0x0004 // socket.h:136:1:
+ SO_SECATTR = 0x1011 // socket.h:198:1:
+ SO_SNDBUF = 0x1001 // socket.h:182:1:
+ SO_SNDLOWAT = 0x1003 // socket.h:184:1:
+ SO_SNDTIMEO = 0x1005 // socket.h:186:1:
+ SO_TIMESTAMP = 0x1013 // socket.h:200:1:
+ SO_TYPE = 0x1008 // socket.h:189:1:
+ SO_USELOOPBACK = 0x0040 // socket.h:140:1:
+ SO_VRRP = 0x1017 // socket.h:205:1:
+ SYSNAME = 9 // param.h:184:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TYPICALMAXPATHLEN = 64 // param.h:200:1:
+ UBSIZE = 512 // param.h:167:1:
+ UID_DLADM = 15 // param.h:98:1:
+ UID_NETADM = 16 // param.h:99:1:
+ UID_NOACCESS = 60002 // param.h:101:1:
+ UID_NOBODY = 60001 // param.h:94:1:
+ UID_UNKNOWN = 96 // param.h:96:1:
+ UIOA_ALLOC = 0x0001 // uio.h:194:1:
+ UIOA_CLR = -16 // uio.h:199:1:
+ UIOA_ENABLED = 0x0004 // uio.h:196:1:
+ UIOA_FINI = 0x0008 // uio.h:197:1:
+ UIOA_INIT = 0x0002 // uio.h:195:1:
+ UIOA_IOV_MAX = 16 // uio.h:112:1:
+ UIOA_POLL = 0x0010 // uio.h:201:1:
+ UIO_ASYNC = 0x0002 // uio.h:237:1:
+ UIO_COPY_CACHED = 0x0001 // uio.h:235:1:
+ UIO_COPY_DEFAULT = 0x0000 // uio.h:234:1:
+ UIO_XUIO = 0x0004 // uio.h:238:1:
+ X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
+ X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
+ X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
+ X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
+ X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
+ X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
+ X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
+ X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
+ X_CS_LFS_LIBS = 70 // unistd.h:58:1:
+ X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
+ X_CS_PATH = 65 // unistd.h:50:1:
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
+ X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
+ X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
+ X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IN_ADDR_T = 0 // byteorder.h:78:1:
+ X_IN_PORT_T = 0 // byteorder.h:73:1:
+ X_IPADDR_T = 0 // in.h:98:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NETINET_IN_H = 0 // in.h:33:1:
+ X_NET_IF_DL_H = 0 // if_dl.h:39:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1:
+ X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
+ X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
+ X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
+ X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
+ X_PC_ASYNC_IO = 10 // unistd.h:299:1:
+ X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
+ X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
+ X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
+ X_PC_LAST = 101 // unistd.h:336:1:
+ X_PC_LINK_MAX = 1 // unistd.h:289:1:
+ X_PC_MAX_CANON = 2 // unistd.h:290:1:
+ X_PC_MAX_INPUT = 3 // unistd.h:291:1:
+ X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
+ X_PC_NAME_MAX = 4 // unistd.h:292:1:
+ X_PC_NO_TRUNC = 7 // unistd.h:295:1:
+ X_PC_PATH_MAX = 5 // unistd.h:293:1:
+ X_PC_PIPE_BUF = 6 // unistd.h:294:1:
+ X_PC_PRIO_IO = 11 // unistd.h:300:1:
+ X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
+ X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
+ X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
+ X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
+ X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
+ X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
+ X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
+ X_PC_SYNC_IO = 12 // unistd.h:301:1:
+ X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
+ X_PC_VDISABLE = 8 // unistd.h:296:1:
+ X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
+ X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
+ X_POSIX2_C_BIND = 1 // unistd.h:401:1:
+ X_POSIX2_C_DEV = 1 // unistd.h:402:1:
+ X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
+ X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
+ X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
+ X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
+ X_POSIX2_UPE = 1 // unistd.h:406:1:
+ X_POSIX2_VERSION = 199209 // unistd.h:363:1:
+ X_POSIX_REGEXP = 1 // unistd.h:410:1:
+ X_POSIX_SHELL = 1 // unistd.h:411:1:
+ X_POSIX_VDISABLE = 0 // param.h:70:1:
+ X_POSIX_VERSION = 199506 // unistd.h:355:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SA_FAMILY_T = 0 // socket_impl.h:42:1:
+ X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
+ X_SC_2_C_BIND = 45 // unistd.h:153:1:
+ X_SC_2_C_DEV = 46 // unistd.h:154:1:
+ X_SC_2_C_VERSION = 47 // unistd.h:155:1:
+ X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
+ X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
+ X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
+ X_SC_2_PBS = 724 // unistd.h:246:1:
+ X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
+ X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
+ X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
+ X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
+ X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
+ X_SC_2_SW_DEV = 51 // unistd.h:159:1:
+ X_SC_2_UPE = 52 // unistd.h:160:1:
+ X_SC_2_VERSION = 53 // unistd.h:161:1:
+ X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
+ X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
+ X_SC_AIO_MAX = 19 // unistd.h:126:1:
+ X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
+ X_SC_ARG_MAX = 1 // unistd.h:106:1:
+ X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
+ X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
+ X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
+ X_SC_BARRIERS = 732 // unistd.h:253:1:
+ X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
+ X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
+ X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
+ X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
+ X_SC_CHILD_MAX = 2 // unistd.h:107:1:
+ X_SC_CLK_TCK = 3 // unistd.h:108:1:
+ X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
+ X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
+ X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
+ X_SC_CPUID_MAX = 517 // unistd.h:211:1:
+ X_SC_CPUTIME = 734 // unistd.h:255:1:
+ X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
+ X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
+ X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
+ X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
+ X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
+ X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
+ X_SC_EPHID_MAX = 518 // unistd.h:212:1:
+ X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
+ X_SC_FSYNC = 23 // unistd.h:130:1:
+ X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
+ X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
+ X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
+ X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
+ X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
+ X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
+ X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
+ X_SC_IOV_MAX = 77 // unistd.h:180:1:
+ X_SC_IPV6 = 762 // unistd.h:283:1:
+ X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
+ X_SC_LINE_MAX = 60 // unistd.h:168:1:
+ X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
+ X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
+ X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
+ X_SC_MAXPID = 514 // unistd.h:208:1:
+ X_SC_MEMLOCK = 25 // unistd.h:132:1:
+ X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
+ X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
+ X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
+ X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
+ X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
+ X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
+ X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
+ X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
+ X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
+ X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
+ X_SC_OPEN_MAX = 5 // unistd.h:110:1:
+ X_SC_PAGESIZE = 11 // unistd.h:117:1:
+ X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
+ X_SC_PASS_MAX = 9 // unistd.h:115:1:
+ X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
+ X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
+ X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
+ X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
+ X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
+ X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
+ X_SC_REGEXP = 738 // unistd.h:259:1:
+ X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
+ X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
+ X_SC_SAVED_IDS = 7 // unistd.h:112:1:
+ X_SC_SEMAPHORES = 35 // unistd.h:142:1:
+ X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
+ X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
+ X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
+ X_SC_SHELL = 739 // unistd.h:260:1:
+ X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
+ X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
+ X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
+ X_SC_SPAWN = 740 // unistd.h:261:1:
+ X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
+ X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
+ X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
+ X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
+ X_SC_STACK_PROT = 515 // unistd.h:209:1:
+ X_SC_STREAM_MAX = 16 // unistd.h:122:1:
+ X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
+ X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
+ X_SC_THREADS = 576 // unistd.h:227:1:
+ X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
+ X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
+ X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
+ X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
+ X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
+ X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
+ X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
+ X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
+ X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
+ X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
+ X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
+ X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
+ X_SC_TIMEOUTS = 747 // unistd.h:268:1:
+ X_SC_TIMERS = 43 // unistd.h:150:1:
+ X_SC_TIMER_MAX = 44 // unistd.h:151:1:
+ X_SC_TRACE = 748 // unistd.h:269:1:
+ X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
+ X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
+ X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
+ X_SC_TRACE_LOG = 752 // unistd.h:273:1:
+ X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
+ X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
+ X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
+ X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
+ X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
+ X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
+ X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
+ X_SC_UADDR_MAX = 519 // unistd.h:213:1:
+ X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
+ X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
+ X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
+ X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
+ X_SC_VERSION = 8 // unistd.h:113:1:
+ X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
+ X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
+ X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
+ X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
+ X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
+ X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
+ X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
+ X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
+ X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
+ X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
+ X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
+ X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
+ X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
+ X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOCKLEN_T = 0 // in.h:48:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_SS_MAXSIZE = 256 // socket_impl.h:70:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_CRED_H = 0 // cred.h:35:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NETCONFIG_H = 0 // netconfig.h:35:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_PARAM_H = 0 // param.h:41:1:
+ X_SYS_POLL_H = 0 // poll.h:38:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_SOCKET_H = 0 // socket.h:47:1:
+ X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UIO_H = 0 // uio.h:45:1:
+ X_SYS_UNISTD_H = 0 // unistd.h:40:1:
+ X_SYS_UN_H = 0 // un.h:39:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_TTY_BUFSIZ = 2048 // param.h:75:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
+ X_XOPEN_REALTIME = 1 // unistd.h:388:1:
+ X_XOPEN_SHM = 1 // unistd.h:390:1:
+ X_XOPEN_STREAMS = 1 // unistd.h:412:1:
+ X_XOPEN_UNIX = 0 // unistd.h:382:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
+ X_XOPEN_XPG3 = 0 // unistd.h:380:1:
+ X_XOPEN_XPG4 = 0 // unistd.h:381:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 1
+)
+
+// uio extensions
+//
+// PSARC 2009/478: Copy Reduction Interfaces
+const ( /* uio.h:146:1: */
+ UIOTYPE_ASYNCIO = 0
+ UIOTYPE_ZEROCOPY = 1
+ UIOTYPE_PEEKSIZE = 2
+)
+
+// I/O direction.
+const ( /* uio.h:220:1: */
+ UIO_READ = 0
+ UIO_WRITE = 1
+)
+
+// Segment flag values.
+const ( /* uio.h:93:1: */
+ UIO_USERSPACE = 0
+ UIO_SYSSPACE = 1
+ UIO_USERISPACE = 2
+)
+
+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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright 2015, Joyent, Inc. All rights reserved.
+// Copyright 2022 Garrett D'Amore
+//
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// Copyright (c) 2014, Joyent, Inc. All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright 2015, Joyent, Inc. All rights reserved.
+// Copyright 2022 Garrett D'Amore
+//
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// Copyright (c) 2014, Joyent, Inc. All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright (c) 2015, Joyent, Inc. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// I/O parameter information. A uio structure describes the I/O which
+// is to be performed by an operation. Typically the data movement will
+// be performed by a routine such as uiomove(), which updates the uio
+// structure to reflect what was done.
+
+type Iovec = struct {
+ Fiov_base uintptr
+ Fiov_len uint64
+} /* uio.h:68:9 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright (c) 2015, Joyent, Inc. All rights reserved.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// I/O parameter information. A uio structure describes the I/O which
+// is to be performed by an operation. Typically the data movement will
+// be performed by a routine such as uiomove(), which updates the uio
+// structure to reflect what was done.
+
+type Iovec_t = Iovec /* uio.h:75:3 */
+
+// Segment flag values.
+type Uio_seg_t = uint32 /* uio.h:93:70 */
+
+type Uio = struct {
+ Fuio_iov uintptr
+ Fuio_iovcnt int32
+ F__ccgo_pad1 [4]byte
+ F_uio_offset Lloff_t
+ Fuio_segflg uint32
+ Fuio_fmode uint16
+ Fuio_extflg uint16
+ F_uio_limit Lloff_t
+ Fuio_resid int64
+} /* uio.h:95:9 */
+
+type Uio_t = Uio /* uio.h:104:3 */
+
+// Extended uio_t uioa_t used for asynchronous uio.
+//
+// Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
+// as there isn't a formal definition of IOV_MAX for the kernel.
+
+type Uioa_page_s = struct {
+ Fuioa_pfncnt int32
+ F__ccgo_pad1 [4]byte
+ Fuioa_ppp uintptr
+ Fuioa_base uintptr
+ Fuioa_len uint64
+} /* uio.h:114:9 */
+
+// Extended uio_t uioa_t used for asynchronous uio.
+//
+// Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
+// as there isn't a formal definition of IOV_MAX for the kernel.
+
+type Uioa_page_t = Uioa_page_s /* uio.h:119:3 */
+
+type Uioa_s = struct {
+ Fuio_iov uintptr
+ Fuio_iovcnt int32
+ F__ccgo_pad1 [4]byte
+ F_uio_offset Lloff_t
+ Fuio_segflg uint32
+ Fuio_fmode uint16
+ Fuio_extflg uint16
+ F_uio_limit Lloff_t
+ Fuio_resid int64
+ Fuioa_state uint32
+ F__ccgo_pad2 [4]byte
+ Fuioa_mbytes int64
+ Fuioa_lcur uintptr
+ Fuioa_lppp uintptr
+ Fuioa_hwst [4]uintptr
+ Fuioa_locked [16]Uioa_page_t
+} /* uio.h:121:9 */
+
+type Uioa_t = Uioa_s /* uio.h:139:3 */
+
+// uio extensions
+//
+// PSARC 2009/478: Copy Reduction Interfaces
+type Xuio_type_t = uint32 /* uio.h:150:3 */
+
+type Xuio = struct {
+ Fxu_uio Uio_t
+ Fxu_type uint32
+ F__ccgo_pad1 [4]byte
+ Fxu_ext struct {
+ Fxu_aio struct {
+ Fxu_a_state uint32
+ F__ccgo_pad1 [4]byte
+ Fxu_a_mbytes int64
+ Fxu_a_lcur uintptr
+ Fxu_a_lppp uintptr
+ Fxu_a_hwst [4]uintptr
+ Fxu_a_locked [16]Uioa_page_t
+ }
+ }
+} /* uio.h:152:9 */
+
+type Xuio_t = Xuio /* uio.h:189:3 */
+
+// I/O direction.
+type Uio_rw_t = uint32 /* uio.h:220:45 */
+
+// uio_extflg: extended flags
+//
+// NOTE: This flag will be used in uiomove to determine if non-temporal
+// access, ie, access bypassing caches, should be used. Filesystems that
+// don't initialize this field could experience suboptimal performance due to
+// the random data the field contains.
+//
+// NOTE: This flag is also used by uioasync callers to pass an extended
+// uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
+// consumers of a uioa_t require the uio_extflg to be initialized.
+
+// Global uioasync capability shadow state.
+type Uioasync_s = struct {
+ Fenabled uint32
+ F__ccgo_pad1 [4]byte
+ Fmincnt uint64
+} /* uio.h:243:9 */
+
+// uio_extflg: extended flags
+//
+// NOTE: This flag will be used in uiomove to determine if non-temporal
+// access, ie, access bypassing caches, should be used. Filesystems that
+// don't initialize this field could experience suboptimal performance due to
+// the random data the field contains.
+//
+// NOTE: This flag is also used by uioasync callers to pass an extended
+// uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
+// consumers of a uioa_t require the uio_extflg to be initialized.
+
+// Global uioasync capability shadow state.
+type Uioasync_t = Uioasync_s /* uio.h:246:3 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Portions of this source code were derived from Berkeley 4.3 BSD
+// under license from the Regents of the University of California.
+
+type Sa_family_t = uint16 /* socket_impl.h:43:18 */
+
+// Structure used by kernel to store most
+// addresses.
+type Sockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]int8
+} /* socket_impl.h:50:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// Definitions for UNIX IPC domain.
+type Sockaddr_un = struct {
+ Fsun_family uint16
+ Fsun_path [108]int8
+} /* un.h:53:1 */
+
+// Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// 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 UCB 8.1 (Berkeley) 6/10/93
+
+// A Link-Level Sockaddr may specify the interface in one of two
+// ways: either by means of a system-provided index number (computed
+// anew and possibly differently on every reboot), or by a human-readable
+// string such as "il0" (for managerial convenience).
+//
+// Census taking actions, such as something akin to SIOCGCONF would return
+// both the index and the human name.
+//
+// High volume transactions (such as giving a link-level ``from'' address
+// in a recvfrom or recvmsg call) may be likely only to provide the indexed
+// form, (which requires fewer copy operations and less space).
+//
+// The form and interpretation of the link-level address is purely a matter
+// of convention between the device driver and its consumers; however, it is
+// expected that all drivers for an interface of a given if_type will agree.
+
+// Structure of a Link-Level sockaddr:
+type Sockaddr_dl = struct {
+ Fsdl_family uint16
+ Fsdl_index uint16
+ Fsdl_type uint8
+ Fsdl_nlen uint8
+ Fsdl_alen uint8
+ Fsdl_slen uint8
+ Fsdl_data [244]int8
+} /* if_dl.h:68:1 */
+
+// sockaddr_storage:
+// Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
+// structures. Has sufficient size and alignment for those sockaddrs.
+
+// Desired maximum size, alignment size and related types.
+
+// To represent desired sockaddr max alignment for platform, a
+// type is chosen which may depend on implementation platform architecture.
+// Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
+// We desire to force up to (but no more than) 64-bit (8 byte) alignment,
+// on platforms where it is possible to do so. (e.g not possible on ia32).
+// For all currently supported platforms by our implementation
+// in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
+// type "double" is suitable for that intent.
+//
+// Note: Type "double" is chosen over the more obvious integer type int64_t.
+//
+// int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
+type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */
+
+// Definitions used for sockaddr_storage structure paddings design.
+
+type Sockaddr_storage = struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+} /* socket_impl.h:96:1 */
+
+// To be compatible with the Linux interfaces used, this structure is
+// placed in socket_impl.h so that an include for <sys/socket.h> will
+// pickup this structure. This structure is for use with PF_PACKET
+// sockets.
+type Sockaddr_ll = struct {
+ Fsll_family uint16
+ Fsll_protocol uint16
+ Fsll_ifindex int32
+ Fsll_hatype uint16
+ Fsll_pkttype uint8
+ Fsll_halen uint8
+ Fsll_addr [8]uint8
+} /* socket_impl.h:111:1 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 Joyent, Inc.
+
+type Netconfig = struct {
+ Fnc_netid uintptr
+ Fnc_semantics uint32
+ Fnc_flag uint32
+ Fnc_protofmly uintptr
+ Fnc_proto uintptr
+ Fnc_device uintptr
+ Fnc_nlookups uint32
+ F__ccgo_pad1 [4]byte
+ Fnc_lookups uintptr
+ Fnc_unused [8]uint32
+} /* netconfig.h:44:1 */
+
+type NCONF_HANDLE = struct {
+ Fnc_head uintptr
+ Fnc_curr uintptr
+} /* netconfig.h:59:3 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd = struct {
+ Ffd int32
+ Fevents int16
+ Frevents int16
+} /* poll.h:48:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// Copyright 2015, Joyent, Inc.
+
+// Structure of file descriptor/event pairs supplied in
+// the poll arrays.
+type Pollfd_t = Pollfd /* poll.h:52:3 */
+
+type Nfds_t = uint64 /* poll.h:54:23 */
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2015, Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+// Copyright (c) 1982, 1986 Regents of the University of California.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms are permitted
+// provided that this notice is preserved and that due credit is given
+// to the University of California at Berkeley. The name of the University
+// may not be used to endorse or promote products derived from this
+// software without specific prior written permission. This software
+// is provided ``as is'' without express or implied warranty.
+
+// Constants and structures defined by the internet system,
+// according to following documents
+//
+// Internet ASSIGNED NUMBERS (RFC1700) and its successors:
+// http://www.iana.org/assignments/protocol-numbers
+// http://www.iana.org/assignments/port-numbers
+// Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
+//
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Portions of this source code were derived from Berkeley 4.3 BSD
+// under license from the Regents of the University of California.
+
+// The socklen definitions are reproduced here from sys/socket.h so as to
+// not introduce that namespace into existing users of netinet/in.h.
+type Socklen_t = uint32 /* in.h:57:18 */
+
+type Psocklen_t = uintptr /* in.h:63:15 */
+
+// Symbols such as htonl() are required to be exposed through this file,
+// per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// macros for conversion between host and (internet) network byte order
+
+type In_port_t = uint16 /* byteorder.h:74:18 */
+
+type In_addr_t = uint32 /* byteorder.h:79:18 */
+
+// Macros to reverse byte order
+
+// Macros to convert from a specific byte order to/from native byte order
+
+// Macros to read unaligned values from a specific byte order to
+// native byte order
+
+// Macros to write unaligned values from native byte order to a specific byte
+// order.
+
+// Note: IPv4 address data structures usage conventions.
+// The "in_addr_t" type below (required by Unix standards)
+// is NOT a typedef of "struct in_addr" and violates the usual
+// conventions where "struct <name>" and <name>_t are corresponding
+// typedefs.
+// To minimize confusion, kernel data structures/usage prefers use
+// of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
+// The user level APIs continue to follow the historic popular
+// practice of using "struct in_addr".
+
+type Ipaddr_t = uint32 /* in.h:99:18 */
+
+type In6_addr = struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+} /* in.h:104:1 */
+
+type In6_addr_t = In6_addr /* in.h:137:25 */
+
+// Protocols
+//
+// Some of these constant names are copied for the DTrace IP provider in
+// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
+// in sync.
+// Transmission Protocol
+
+// Port/socket numbers: network standard functions
+//
+// Entries should exist here for each port number compiled into an ON
+// component, such as snoop.
+
+// Port/socket numbers: host specific functions
+
+// Internet Key Exchange (IKE) ports
+
+// UNIX TCP sockets
+
+// UNIX UDP sockets
+
+// DHCPv6 UDP ports
+
+// Ports < IPPORT_RESERVED are reserved for
+// privileged processes (e.g. root).
+// Ports > IPPORT_USERRESERVED are reserved
+// for servers, not necessarily privileged.
+
+// Link numbers
+
+// IPv4 Internet address
+// This definition contains obsolete fields for compatibility
+// with SunOS 3.x and 4.2bsd. The presence of subnets renders
+// divisions into fixed fields misleading at best. New code
+// should use only the s_addr field.
+
+type In_addr = struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+} /* in.h:301: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.
+//
+// Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
+// IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
+// obsolete". IN_MULTICAST macro should be used to test if a address
+// is a multicast address.
+
+// We have removed CLASS E checks from the kernel
+// But we preserve these defines for userland in order
+// to avoid compile breakage of some 3rd party piece of software
+
+// Scoped IPv4 prefixes (in host byte-order)
+
+// RFC 3927 IPv4 link local address (i in host byte-order)
+
+// Well known 6to4 Relay Router Anycast address defined in RFC 3068
+
+// Define a macro to stuff the loopback address into an Internet address
+
+// IPv4 Socket address.
+type Sockaddr_in = struct {
+ Fsin_family uint16
+ Fsin_port uint16
+ Fsin_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fsin_zero [8]int8
+} /* in.h:409:1 */
+
+// IPv6 socket address.
+type Sockaddr_in6 = struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+} /* in.h:424:1 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req = struct {
+ Fipsr_ah_req uint32
+ Fipsr_esp_req uint32
+ Fipsr_self_encap_req uint32
+ Fipsr_auth_alg uint8
+ Fipsr_esp_alg uint8
+ Fipsr_esp_auth_alg uint8
+ F__ccgo_pad1 [1]byte
+} /* in.h:950:9 */
+
+// Macros for accessing the traffic class and flow label fields from
+// sin6_flowinfo.
+// These are designed to be applied to a 32-bit value.
+
+// masks
+
+// Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
+// use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
+// only. They need to be different for User/Kernel versions because union
+// component data structure is defined differently (it is identical at
+// binary representation level).
+//
+// const struct in6_addr IN6ADDR_ANY_INIT;
+// const struct in6_addr IN6ADDR_LOOPBACK_INIT;
+
+// RFC 2553 specifies the following macros. Their type is defined
+// as "int" in the RFC but they only have boolean significance
+// (zero or non-zero). For the purposes of our comment notation,
+// we assume a hypothetical type "bool" defined as follows to
+// write the prototypes assumed for macros in our comments better.
+//
+// typedef int bool;
+
+// IN6 macros used to test for special IPv6 addresses
+// (Mostly from spec)
+//
+// bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
+// bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
+// bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
+// bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
+// bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
+// bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
+// bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
+// const struct in6_addr *); -- Not from RFC2553
+// bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
+
+// IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
+// Note: This macro is currently NOT defined in RFC2553 specification
+// and not a standard macro that portable applications should use.
+
+// Exclude loopback and unspecified address
+
+// Note:
+// IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
+// specification and not a standard macro that portable applications
+// should use.
+
+// The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+// RFC, and shouldn't be used by portable applications. It is used to see
+// if an address is a solicited-node multicast address, which is prefixed
+// with ff02:0:0:0:0:1:ff00::/104.
+
+// Macros to a) test for 6to4 IPv6 address, and b) to test if two
+// 6to4 addresses have the same /48 prefix, and, hence, are from the
+// same 6to4 site.
+
+// IN6_IS_ADDR_LINKSCOPE
+// Identifies an address as being either link-local, link-local multicast or
+// node-local multicast. All types of addresses are considered to be unique
+// within the scope of a given link.
+
+// Useful utility macros for operations with IPv6 addresses
+// Note: These macros are NOT defined in the RFC2553 or any other
+// standard specification and are not standard macros that portable
+// applications should use.
+
+// IN6_V4MAPPED_TO_INADDR
+// IN6_V4MAPPED_TO_IPADDR
+// Assign a IPv4-Mapped IPv6 address to an IPv4 address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
+// void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
+//
+
+// IN6_INADDR_TO_V4MAPPED
+// IN6_IPADDR_TO_V4MAPPED
+// Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
+// address.
+// Note: These macros are NOT defined in RFC2553 or any other standard
+// specification and are not macros that portable applications should
+// use.
+//
+// void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
+// void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
+//
+
+// IN6_6TO4_TO_V4ADDR
+// Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
+// address.
+// Note: This macro is NOT defined in RFC2553 or any other standard
+// specification and is not a macro that portable applications should
+// use.
+// Note: we don't use the IPADDR form of the macro because we need
+// to do a bytewise copy; the V4ADDR in the 6to4 address is not
+// 32-bit aligned.
+//
+// void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
+//
+
+// IN6_V4ADDR_TO_6TO4
+// Given an IPv4 address and an IPv6 address for output, a 6to4 address
+// will be created from the IPv4 Address.
+// Note: This method for creating 6to4 addresses is not standardized
+// outside of Solaris. The newly created 6to4 address will be of the form
+// 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
+// HOSTID will equal 1.
+//
+// void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
+//
+
+// IN6_ARE_ADDR_EQUAL (defined in RFC2292)
+// Compares if IPv6 addresses are equal.
+// Note: Compares in order of high likelyhood of a miss so we minimize
+// compares. (Current heuristic order, compare in reverse order of
+// uint32_t units)
+//
+// bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *);
+
+// IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
+// Compares if prefixed parts of IPv6 addresses are equal.
+//
+// uint32_t IN6_MASK_FROM_PREFIX(int, int);
+// bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
+// const struct in6_addr *,
+// int);
+
+// Options for use with [gs]etsockopt at the IP level.
+//
+// Note: Some of the IP_ namespace has conflict with and
+// and is exposed through <xti.h>. (It also requires exposing
+// options not implemented). The options with potential
+// for conflicts use #ifndef guards.
+
+// IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
+// is used to differentiate b/w the two.
+
+// Different preferences that can be requested from IPSEC protocols.
+// This can be used with the setsockopt() call to set per socket security
+// options. When the application uses per-socket API, we will reflect
+// the request on both outbound and inbound packets.
+
+type Ipsec_req_t = Ipsec_req /* in.h:957:3 */
+
+// MCAST_* options are protocol-independent. The actual definitions
+// are with the v6 options below; this comment is here to note the
+// namespace usage.
+//
+// #define MCAST_JOIN_GROUP 0x29
+// #define MCAST_LEAVE_GROUP 0x2a
+// #define MCAST_BLOCK_SOURCE 0x2b
+// #define MCAST_UNBLOCK_SOURCE 0x2c
+// #define MCAST_JOIN_SOURCE_GROUP 0x2d
+// #define MCAST_LEAVE_SOURCE_GROUP 0x2e
+
+// SunOS private (potentially not portable) IP_ option names
+// can be reused 0x44
+
+// Option values and names (when !_XPG5) shared with <xti_inet.h>
+
+// The following option values are reserved by <xti_inet.h>
+//
+// T_IP_OPTIONS 0x107 - IP per-packet options
+// T_IP_TOS 0x108 - IP per packet type of service
+
+// Default value constants for multicast attributes controlled by
+// IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
+
+// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
+type Ip_mreq = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1015:1 */
+
+// Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
+// IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
+type Ip_mreq_source = struct {
+ Fimr_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_sourceaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimr_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1024:1 */
+
+// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
+// IPv6 addresses.
+type Ipv6_mreq = struct {
+ Fipv6mr_multiaddr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipv6mr_interface uint32
+} /* in.h:1034:1 */
+
+// Use #pragma pack() construct to force 32-bit alignment on amd64.
+// This is needed to keep the structure size and offsets consistent
+// between a 32-bit app and the 64-bit amd64 kernel in structures
+// where 64-bit alignment would create gaps (in this case, structures
+// which have a uint32_t followed by a struct sockaddr_storage).
+
+// Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
+type Group_req = struct {
+ Fgr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1053:1 */
+
+// Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
+// MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
+type Group_source_req = struct {
+ Fgsr_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgsr_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgsr_source struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1062:1 */
+
+// Argument for SIOC[GS]MSFILTER ioctls
+type Group_filter = struct {
+ Fgf_interface uint32
+ F__ccgo_pad1 [4]byte
+ Fgf_group struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+ Fgf_fmode uint32
+ Fgf_numsrc uint32
+ Fgf_slist [1]struct {
+ Fss_family uint16
+ F_ss_pad1 [6]int8
+ F_ss_align float64
+ F_ss_pad2 [240]int8
+ }
+} /* in.h:1071:1 */
+
+// Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
+type Ip_msfilter = struct {
+ Fimsf_multiaddr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_interface struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fimsf_fmode uint32
+ Fimsf_numsrc uint32
+ Fimsf_slist [1]struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1090:1 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo = struct {
+ Fipi_ifindex uint32
+ Fipi_spec_dst struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+ Fipi_addr struct {
+ FS_un struct {
+ F__ccgo_pad1 [0]uint32
+ FS_un_b struct {
+ Fs_b1 uint8
+ Fs_b2 uint8
+ Fs_b3 uint8
+ Fs_b4 uint8
+ }
+ }
+ }
+} /* in.h:1127:9 */
+
+// Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
+
+// Argument struct for IP_PKTINFO option
+type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */
+
+// Argument struct for IPV6_PKTINFO option
+type In6_pktinfo = struct {
+ Fipi6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fipi6_ifindex uint32
+} /* in.h:1136:1 */
+
+// Argument struct for IPV6_MTUINFO option
+type Ip6_mtuinfo = struct {
+ Fip6m_addr struct {
+ Fsin6_family uint16
+ Fsin6_port uint16
+ Fsin6_flowinfo uint32
+ Fsin6_addr struct {
+ F_S6_un struct {
+ F__ccgo_pad1 [0]uint32
+ F_S6_u8 [16]uint8
+ }
+ }
+ Fsin6_scope_id uint32
+ F__sin6_src_id uint32
+ }
+ Fip6m_mtu uint32
+} /* in.h:1144:1 */
+
+// Argument structure for IP_ADD_PROXY_ADDR.
+// Note that this is an unstable, experimental interface. It may change
+// later. Don't use it unless you know what it is.
+type In_prefix_t = struct {
+ Fin_prefix_addr In_addr
+ Fin_prefix_len uint32
+} /* in.h:1183:3 */
+
+// Definitions related to sockets: types, address families, options.
+
+// Types
+
+// Flags for socket() and accept4()
+
+// Option flags per-socket.
+
+// Socket options are passed using a signed integer, but it is also rare
+// for more than one to ever be passed at the same time with setsockopt
+// and only one at a time can be retrieved with getsockopt.
+//
+// Since the lower numbers cannot be renumbered for compatibility reasons,
+// it would seem that we need to start a new number space (0x40000000 -
+// 0x7fffffff) for those that don't need to be stored as a bit flag
+// somewhere. This limits the flag options to 30 but that seems to be
+// plenty, anyway. 0x40000000 is reserved for future use.
+
+// N.B.: The following definition is present only for compatibility
+// with release 3.0. It will disappear in later releases.
+
+// Additional options, not kept in so_options.
+
+// "Socket"-level control message types:
+
+// Socket filter options
+
+// Structure returned by FIL_LIST
+type Fil_info = struct {
+ Ffi_flags int32
+ Ffi_pos int32
+ Ffi_name [32]int8
+} /* socket.h:225:1 */
+
+// Structure used for manipulating linger option.
+type Linger = struct {
+ Fl_onoff int32
+ Fl_linger int32
+} /* socket.h:254:1 */
+
+// Levels for (get/set)sockopt() that don't apply to a specific protocol.
+
+// Address families.
+//
+// Some of these constant names are copied for the DTrace IP provider in
+// usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
+// in sync.
+
+// Protocol families, same as address families for now.
+
+// Maximum queue length specifiable by listen.
+
+// Message header for recvmsg and sendmsg calls.
+type Msghdr = struct {
+ Fmsg_name uintptr
+ Fmsg_namelen uint32
+ 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:365:1 */
+
+// with left over data
+
+// Obsolete but kept for compilation compatibility. Use IOV_MAX.
+
+// Added for XPGv2 compliance
+
+type Cmsghdr = struct {
+ Fcmsg_len uint32
+ Fcmsg_level int32
+ Fcmsg_type int32
+} /* socket.h:462:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go
index c5ca270fe..e6bdae345 100644
--- a/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.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 -ignore-unsupported-alignment -o sys/socket/socket_linux_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_linux_loong64.go -pkgname socket', DO NOT EDIT.
package socket
@@ -15,271 +15,296 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- AF_ALG = 38 // socket.h:133:1:
- AF_APPLETALK = 5 // socket.h:99:1:
- AF_ASH = 18 // socket.h:113:1:
- AF_ATMPVC = 8 // socket.h:102:1:
- AF_ATMSVC = 20 // socket.h:115:1:
- AF_AX25 = 3 // socket.h:97:1:
- AF_BLUETOOTH = 31 // socket.h:126:1:
- AF_BRIDGE = 7 // socket.h:101:1:
- AF_CAIF = 37 // socket.h:132:1:
- AF_CAN = 29 // socket.h:124:1:
- AF_DECnet = 12 // socket.h:106:1:
- AF_ECONET = 19 // socket.h:114:1:
- AF_FILE = 1 // socket.h:95:1:
- AF_IB = 27 // socket.h:122:1:
- AF_IEEE802154 = 36 // socket.h:131:1:
- AF_INET = 2 // socket.h:96:1:
- AF_INET6 = 10 // socket.h:104:1:
- AF_IPX = 4 // socket.h:98:1:
- AF_IRDA = 23 // socket.h:118:1:
- AF_ISDN = 34 // socket.h:129:1:
- AF_IUCV = 32 // socket.h:127:1:
- AF_KCM = 41 // socket.h:136:1:
- AF_KEY = 15 // socket.h:109:1:
- AF_LLC = 26 // socket.h:121:1:
- AF_LOCAL = 1 // socket.h:93:1:
- AF_MAX = 45 // socket.h:140:1:
- AF_MPLS = 28 // socket.h:123:1:
- AF_NETBEUI = 13 // socket.h:107:1:
- AF_NETLINK = 16 // socket.h:110:1:
- AF_NETROM = 6 // socket.h:100:1:
- AF_NFC = 39 // socket.h:134:1:
- AF_PACKET = 17 // socket.h:112:1:
- AF_PHONET = 35 // socket.h:130:1:
- AF_PPPOX = 24 // socket.h:119:1:
- AF_QIPCRTR = 42 // socket.h:137:1:
- AF_RDS = 21 // socket.h:116:1:
- AF_ROSE = 11 // socket.h:105:1:
- AF_ROUTE = 16 // socket.h:111:1:
- AF_RXRPC = 33 // socket.h:128:1:
- AF_SECURITY = 14 // socket.h:108:1:
- AF_SMC = 43 // socket.h:138:1:
- AF_SNA = 22 // socket.h:117:1:
- AF_TIPC = 30 // socket.h:125:1:
- AF_UNIX = 1 // socket.h:94:1:
- AF_UNSPEC = 0 // socket.h:92:1:
- AF_VSOCK = 40 // socket.h:135:1:
- AF_WANPIPE = 25 // socket.h:120:1:
- AF_X25 = 9 // socket.h:103:1:
- AF_XDP = 44 // socket.h:139:1:
- BIG_ENDIAN = 4321 // endian.h:28:1:
- BYTE_ORDER = 1234 // endian.h:30:1:
- FD_SETSIZE = 1024 // select.h:73:1:
- FIOGETOWN = 0x8903 // sockios.h:8:1:
- FIOSETOWN = 0x8901 // sockios.h:6:1:
- LITTLE_ENDIAN = 1234 // endian.h:27:1:
- PDP_ENDIAN = 3412 // endian.h:29:1:
- PF_ALG = 38 // socket.h:82:1:
- PF_APPLETALK = 5 // socket.h:48:1:
- PF_ASH = 18 // socket.h:62:1:
- PF_ATMPVC = 8 // socket.h:51:1:
- PF_ATMSVC = 20 // socket.h:64:1:
- PF_AX25 = 3 // socket.h:46:1:
- PF_BLUETOOTH = 31 // socket.h:75:1:
- PF_BRIDGE = 7 // socket.h:50:1:
- PF_CAIF = 37 // socket.h:81:1:
- PF_CAN = 29 // socket.h:73:1:
- PF_DECnet = 12 // socket.h:55:1:
- PF_ECONET = 19 // socket.h:63:1:
- PF_FILE = 1 // socket.h:44:1:
- PF_IB = 27 // socket.h:71:1:
- PF_IEEE802154 = 36 // socket.h:80:1:
- PF_INET = 2 // socket.h:45:1:
- PF_INET6 = 10 // socket.h:53:1:
- PF_IPX = 4 // socket.h:47:1:
- PF_IRDA = 23 // socket.h:67:1:
- PF_ISDN = 34 // socket.h:78:1:
- PF_IUCV = 32 // socket.h:76:1:
- PF_KCM = 41 // socket.h:85:1:
- PF_KEY = 15 // socket.h:58:1:
- PF_LLC = 26 // socket.h:70:1:
- PF_LOCAL = 1 // socket.h:42:1:
- PF_MAX = 45 // socket.h:89:1:
- PF_MPLS = 28 // socket.h:72:1:
- PF_NETBEUI = 13 // socket.h:56:1:
- PF_NETLINK = 16 // socket.h:59:1:
- PF_NETROM = 6 // socket.h:49:1:
- PF_NFC = 39 // socket.h:83:1:
- PF_PACKET = 17 // socket.h:61:1:
- PF_PHONET = 35 // socket.h:79:1:
- PF_PPPOX = 24 // socket.h:68:1:
- PF_QIPCRTR = 42 // socket.h:86:1:
- PF_RDS = 21 // socket.h:65:1:
- PF_ROSE = 11 // socket.h:54:1:
- PF_ROUTE = 16 // socket.h:60:1:
- PF_RXRPC = 33 // socket.h:77:1:
- PF_SECURITY = 14 // socket.h:57:1:
- PF_SMC = 43 // socket.h:87:1:
- PF_SNA = 22 // socket.h:66:1:
- PF_TIPC = 30 // socket.h:74:1:
- PF_UNIX = 1 // socket.h:43:1:
- PF_UNSPEC = 0 // socket.h:41:1:
- PF_VSOCK = 40 // socket.h:84:1:
- PF_WANPIPE = 25 // socket.h:69:1:
- PF_X25 = 9 // socket.h:52:1:
- PF_XDP = 44 // socket.h:88:1:
- SCM_TIMESTAMP = 29 // socket.h:140:1:
- SCM_TIMESTAMPING = 37 // socket.h:142:1:
- SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
- SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
- SCM_TIMESTAMPNS = 35 // socket.h:141:1:
- SCM_TXTIME = 61 // socket.h:105:1:
- SCM_WIFI_STATUS = 41 // socket.h:64:1:
- SIOCATMARK = 0x8905 // sockios.h:10:1:
- SIOCGPGRP = 0x8904 // sockios.h:9:1:
- SIOCGSTAMP = 0x8906 // sockios.h:11:1:
- SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
- SIOCSPGRP = 0x8902 // sockios.h:7:1:
- SOL_AAL = 265 // socket.h:151:1:
- SOL_ALG = 279 // socket.h:165:1:
- SOL_ATM = 264 // socket.h:150:1:
- SOL_BLUETOOTH = 274 // socket.h:160:1:
- SOL_CAIF = 278 // socket.h:164:1:
- SOL_DCCP = 269 // socket.h:155:1:
- SOL_DECNET = 261 // socket.h:147:1:
- SOL_IRDA = 266 // socket.h:152:1:
- SOL_IUCV = 277 // socket.h:163:1:
- SOL_KCM = 281 // socket.h:167:1:
- SOL_LLC = 268 // socket.h:154:1:
- SOL_NETBEUI = 267 // socket.h:153:1:
- SOL_NETLINK = 270 // socket.h:156:1:
- SOL_NFC = 280 // socket.h:166:1:
- SOL_PACKET = 263 // socket.h:149:1:
- SOL_PNPIPE = 275 // socket.h:161:1:
- SOL_PPPOL2TP = 273 // socket.h:159:1:
- SOL_RAW = 255 // socket.h:146:1:
- SOL_RDS = 276 // socket.h:162:1:
- SOL_RXRPC = 272 // socket.h:158:1:
- SOL_SOCKET = 1 // socket.h:9:1:
- SOL_TIPC = 271 // socket.h:157:1:
- SOL_TLS = 282 // socket.h:168:1:
- SOL_X25 = 262 // socket.h:148:1:
- SOL_XDP = 283 // socket.h:169:1:
- SOMAXCONN = 4096 // socket.h:172:1:
- SO_ACCEPTCONN = 30 // socket.h:51:1:
- SO_ATTACH_BPF = 50 // socket.h:82:1:
- SO_ATTACH_FILTER = 26 // socket.h:45:1:
- SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
- SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
- SO_BINDTODEVICE = 25 // socket.h:42:1:
- SO_BINDTOIFINDEX = 62 // socket.h:107:1:
- SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
- SO_BROADCAST = 6 // socket.h:16:1:
- SO_BSDCOMPAT = 14 // socket.h:26:1:
- SO_BUSY_POLL = 46 // socket.h:74:1:
- SO_CNX_ADVICE = 53 // socket.h:88:1:
- SO_COOKIE = 57 // socket.h:96:1:
- SO_DEBUG = 1 // socket.h:11:1:
- SO_DETACH_BPF = 27 // socket.h:83:1:
- SO_DETACH_FILTER = 27 // socket.h:46:1:
- SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
- SO_DOMAIN = 39 // socket.h:59:1:
- SO_DONTROUTE = 5 // socket.h:15:1:
- SO_ERROR = 4 // socket.h:14:1:
- SO_GET_FILTER = 26 // socket.h:47:1:
- SO_INCOMING_CPU = 49 // socket.h:80:1:
- SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
- SO_KEEPALIVE = 9 // socket.h:21:1:
- SO_LINGER = 13 // socket.h:25:1:
- SO_LOCK_FILTER = 44 // socket.h:70:1:
- SO_MARK = 36 // socket.h:56:1:
- SO_MAX_PACING_RATE = 47 // socket.h:76:1:
- SO_MEMINFO = 55 // socket.h:92:1:
- SO_NOFCS = 43 // socket.h:68:1:
- SO_NO_CHECK = 11 // socket.h:23:1:
- SO_OOBINLINE = 10 // socket.h:22:1:
- SO_PASSCRED = 16 // socket.h:29:1:
- SO_PASSSEC = 34 // socket.h:54:1:
- SO_PEEK_OFF = 42 // socket.h:65:1:
- SO_PEERCRED = 17 // socket.h:30:1:
- SO_PEERGROUPS = 59 // socket.h:100:1:
- SO_PEERNAME = 28 // socket.h:49:1:
- SO_PEERSEC = 31 // socket.h:53:1:
- SO_PRIORITY = 12 // socket.h:24:1:
- SO_PROTOCOL = 38 // socket.h:58:1:
- SO_RCVBUF = 8 // socket.h:18:1:
- SO_RCVBUFFORCE = 33 // socket.h:20:1:
- SO_RCVLOWAT = 18 // socket.h:31:1:
- SO_RCVTIMEO = 20 // socket.h:129:1:
- SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
- SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
- SO_REUSEADDR = 2 // socket.h:12:1:
- SO_REUSEPORT = 15 // socket.h:27:1:
- SO_RXQ_OVFL = 40 // socket.h:61:1:
- SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
- SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
- SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
- SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
- SO_SNDBUF = 7 // socket.h:17:1:
- SO_SNDBUFFORCE = 32 // socket.h:19:1:
- SO_SNDLOWAT = 19 // socket.h:32:1:
- SO_SNDTIMEO = 21 // socket.h:130:1:
- SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
- SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
- SO_TIMESTAMP = 29 // socket.h:125:1:
- SO_TIMESTAMPING = 37 // socket.h:127:1:
- SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
- SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
- SO_TIMESTAMPNS = 35 // socket.h:126:1:
- SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
- SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
- SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
- SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
- SO_TXTIME = 61 // socket.h:104:1:
- SO_TYPE = 3 // socket.h:13:1:
- SO_WIFI_STATUS = 41 // socket.h:63:1:
- SO_ZEROCOPY = 60 // socket.h:102:1:
- X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
- X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ENDIAN_H = 1 // endian.h:19:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_SS_SIZE = 128 // sockaddr.h:40:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_SOCKET_H = 1 // socket.h:20:1:
- X_SYS_TYPES_H = 1 // types.h:23:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ AF_ALG = 38 // socket.h:134:1:
+ AF_APPLETALK = 5 // socket.h:100:1:
+ AF_ASH = 18 // socket.h:114:1:
+ AF_ATMPVC = 8 // socket.h:103:1:
+ AF_ATMSVC = 20 // socket.h:116:1:
+ AF_AX25 = 3 // socket.h:98:1:
+ AF_BLUETOOTH = 31 // socket.h:127:1:
+ AF_BRIDGE = 7 // socket.h:102:1:
+ AF_CAIF = 37 // socket.h:133:1:
+ AF_CAN = 29 // socket.h:125:1:
+ AF_DECnet = 12 // socket.h:107:1:
+ AF_ECONET = 19 // socket.h:115:1:
+ AF_FILE = 1 // socket.h:96:1:
+ AF_IB = 27 // socket.h:123:1:
+ AF_IEEE802154 = 36 // socket.h:132:1:
+ AF_INET = 2 // socket.h:97:1:
+ AF_INET6 = 10 // socket.h:105:1:
+ AF_IPX = 4 // socket.h:99:1:
+ AF_IRDA = 23 // socket.h:119:1:
+ AF_ISDN = 34 // socket.h:130:1:
+ AF_IUCV = 32 // socket.h:128:1:
+ AF_KCM = 41 // socket.h:137:1:
+ AF_KEY = 15 // socket.h:110:1:
+ AF_LLC = 26 // socket.h:122:1:
+ AF_LOCAL = 1 // socket.h:94:1:
+ AF_MAX = 46 // socket.h:142:1:
+ AF_MCTP = 45 // socket.h:141:1:
+ AF_MPLS = 28 // socket.h:124:1:
+ AF_NETBEUI = 13 // socket.h:108:1:
+ AF_NETLINK = 16 // socket.h:111:1:
+ AF_NETROM = 6 // socket.h:101:1:
+ AF_NFC = 39 // socket.h:135:1:
+ AF_PACKET = 17 // socket.h:113:1:
+ AF_PHONET = 35 // socket.h:131:1:
+ AF_PPPOX = 24 // socket.h:120:1:
+ AF_QIPCRTR = 42 // socket.h:138:1:
+ AF_RDS = 21 // socket.h:117:1:
+ AF_ROSE = 11 // socket.h:106:1:
+ AF_ROUTE = 16 // socket.h:112:1:
+ AF_RXRPC = 33 // socket.h:129:1:
+ AF_SECURITY = 14 // socket.h:109:1:
+ AF_SMC = 43 // socket.h:139:1:
+ AF_SNA = 22 // socket.h:118:1:
+ AF_TIPC = 30 // socket.h:126:1:
+ AF_UNIX = 1 // socket.h:95:1:
+ AF_UNSPEC = 0 // socket.h:93:1:
+ AF_VSOCK = 40 // socket.h:136:1:
+ AF_WANPIPE = 25 // socket.h:121:1:
+ AF_X25 = 9 // socket.h:104:1:
+ AF_XDP = 44 // socket.h:140:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FIOGETOWN = 0x8903 // sockios.h:8:1:
+ FIOSETOWN = 0x8901 // sockios.h:6:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ PF_ALG = 38 // socket.h:82:1:
+ PF_APPLETALK = 5 // socket.h:48:1:
+ PF_ASH = 18 // socket.h:62:1:
+ PF_ATMPVC = 8 // socket.h:51:1:
+ PF_ATMSVC = 20 // socket.h:64:1:
+ PF_AX25 = 3 // socket.h:46:1:
+ PF_BLUETOOTH = 31 // socket.h:75:1:
+ PF_BRIDGE = 7 // socket.h:50:1:
+ PF_CAIF = 37 // socket.h:81:1:
+ PF_CAN = 29 // socket.h:73:1:
+ PF_DECnet = 12 // socket.h:55:1:
+ PF_ECONET = 19 // socket.h:63:1:
+ PF_FILE = 1 // socket.h:44:1:
+ PF_IB = 27 // socket.h:71:1:
+ PF_IEEE802154 = 36 // socket.h:80:1:
+ PF_INET = 2 // socket.h:45:1:
+ PF_INET6 = 10 // socket.h:53:1:
+ PF_IPX = 4 // socket.h:47:1:
+ PF_IRDA = 23 // socket.h:67:1:
+ PF_ISDN = 34 // socket.h:78:1:
+ PF_IUCV = 32 // socket.h:76:1:
+ PF_KCM = 41 // socket.h:85:1:
+ PF_KEY = 15 // socket.h:58:1:
+ PF_LLC = 26 // socket.h:70:1:
+ PF_LOCAL = 1 // socket.h:42:1:
+ PF_MAX = 46 // socket.h:90:1:
+ PF_MCTP = 45 // socket.h:89:1:
+ PF_MPLS = 28 // socket.h:72:1:
+ PF_NETBEUI = 13 // socket.h:56:1:
+ PF_NETLINK = 16 // socket.h:59:1:
+ PF_NETROM = 6 // socket.h:49:1:
+ PF_NFC = 39 // socket.h:83:1:
+ PF_PACKET = 17 // socket.h:61:1:
+ PF_PHONET = 35 // socket.h:79:1:
+ PF_PPPOX = 24 // socket.h:68:1:
+ PF_QIPCRTR = 42 // socket.h:86:1:
+ PF_RDS = 21 // socket.h:65:1:
+ PF_ROSE = 11 // socket.h:54:1:
+ PF_ROUTE = 16 // socket.h:60:1:
+ PF_RXRPC = 33 // socket.h:77:1:
+ PF_SECURITY = 14 // socket.h:57:1:
+ PF_SMC = 43 // socket.h:87:1:
+ PF_SNA = 22 // socket.h:66:1:
+ PF_TIPC = 30 // socket.h:74:1:
+ PF_UNIX = 1 // socket.h:43:1:
+ PF_UNSPEC = 0 // socket.h:41:1:
+ PF_VSOCK = 40 // socket.h:84:1:
+ PF_WANPIPE = 25 // socket.h:69:1:
+ PF_X25 = 9 // socket.h:52:1:
+ PF_XDP = 44 // socket.h:88:1:
+ SCM_TIMESTAMP = 29 // socket.h:156:1:
+ SCM_TIMESTAMPING = 37 // socket.h:158:1:
+ SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
+ SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:157:1:
+ SCM_TXTIME = 61 // socket.h:105:1:
+ SCM_WIFI_STATUS = 41 // socket.h:64:1:
+ SIOCATMARK = 0x8905 // sockios.h:10:1:
+ SIOCGPGRP = 0x8904 // sockios.h:9:1:
+ SIOCGSTAMPNS_OLD = 0x8907 // sockios.h:12:1:
+ SIOCGSTAMP_OLD = 0x8906 // sockios.h:11:1:
+ SIOCSPGRP = 0x8902 // sockios.h:7:1:
+ SOL_AAL = 265 // socket.h:153:1:
+ SOL_ALG = 279 // socket.h:167:1:
+ SOL_ATM = 264 // socket.h:152:1:
+ SOL_BLUETOOTH = 274 // socket.h:162:1:
+ SOL_CAIF = 278 // socket.h:166:1:
+ SOL_DCCP = 269 // socket.h:157:1:
+ SOL_DECNET = 261 // socket.h:149:1:
+ SOL_IRDA = 266 // socket.h:154:1:
+ SOL_IUCV = 277 // socket.h:165:1:
+ SOL_KCM = 281 // socket.h:169:1:
+ SOL_LLC = 268 // socket.h:156:1:
+ SOL_MCTP = 285 // socket.h:173:1:
+ SOL_MPTCP = 284 // socket.h:172:1:
+ SOL_NETBEUI = 267 // socket.h:155:1:
+ SOL_NETLINK = 270 // socket.h:158:1:
+ SOL_NFC = 280 // socket.h:168:1:
+ SOL_PACKET = 263 // socket.h:151:1:
+ SOL_PNPIPE = 275 // socket.h:163:1:
+ SOL_PPPOL2TP = 273 // socket.h:161:1:
+ SOL_RAW = 255 // socket.h:148:1:
+ SOL_RDS = 276 // socket.h:164:1:
+ SOL_RXRPC = 272 // socket.h:160:1:
+ SOL_SMC = 286 // socket.h:174:1:
+ SOL_SOCKET = 1 // socket.h:9:1:
+ SOL_TIPC = 271 // socket.h:159:1:
+ SOL_TLS = 282 // socket.h:170:1:
+ SOL_X25 = 262 // socket.h:150:1:
+ SOL_XDP = 283 // socket.h:171:1:
+ SOMAXCONN = 4096 // socket.h:177:1:
+ SO_ACCEPTCONN = 30 // socket.h:51:1:
+ SO_ATTACH_BPF = 50 // socket.h:82:1:
+ SO_ATTACH_FILTER = 26 // socket.h:45:1:
+ SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
+ SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
+ SO_BINDTODEVICE = 25 // socket.h:42:1:
+ SO_BINDTOIFINDEX = 62 // socket.h:107:1:
+ SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
+ SO_BROADCAST = 6 // socket.h:16:1:
+ SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUF_LOCK = 72 // socket.h:127:1:
+ SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_BUSY_POLL_BUDGET = 70 // socket.h:123:1:
+ SO_CNX_ADVICE = 53 // socket.h:88:1:
+ SO_COOKIE = 57 // socket.h:96:1:
+ SO_DEBUG = 1 // socket.h:11:1:
+ SO_DETACH_BPF = 27 // socket.h:83:1:
+ SO_DETACH_FILTER = 27 // socket.h:46:1:
+ SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
+ SO_DOMAIN = 39 // socket.h:59:1:
+ SO_DONTROUTE = 5 // socket.h:15:1:
+ SO_ERROR = 4 // socket.h:14:1:
+ SO_GET_FILTER = 26 // socket.h:47:1:
+ SO_INCOMING_CPU = 49 // socket.h:80:1:
+ SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
+ SO_KEEPALIVE = 9 // socket.h:21:1:
+ SO_LINGER = 13 // socket.h:25:1:
+ SO_LOCK_FILTER = 44 // socket.h:70:1:
+ SO_MARK = 36 // socket.h:56:1:
+ SO_MAX_PACING_RATE = 47 // socket.h:76:1:
+ SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NETNS_COOKIE = 71 // socket.h:125:1:
+ SO_NOFCS = 43 // socket.h:68:1:
+ SO_NO_CHECK = 11 // socket.h:23:1:
+ SO_OOBINLINE = 10 // socket.h:22:1:
+ SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSPIDFD = 76 // socket.h:135:1:
+ SO_PASSSEC = 34 // socket.h:54:1:
+ SO_PEEK_OFF = 42 // socket.h:65:1:
+ SO_PEERCRED = 17 // socket.h:30:1:
+ SO_PEERGROUPS = 59 // socket.h:100:1:
+ SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERPIDFD = 77 // socket.h:136:1:
+ SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PREFER_BUSY_POLL = 69 // socket.h:122:1:
+ SO_PRIORITY = 12 // socket.h:24:1:
+ SO_PROTOCOL = 38 // socket.h:58:1:
+ SO_RCVBUF = 8 // socket.h:18:1:
+ SO_RCVBUFFORCE = 33 // socket.h:20:1:
+ SO_RCVLOWAT = 18 // socket.h:31:1:
+ SO_RCVMARK = 75 // socket.h:133:1:
+ SO_RCVTIMEO = 20 // socket.h:145:1:
+ SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
+ SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_RESERVE_MEM = 73 // socket.h:129:1:
+ SO_REUSEADDR = 2 // socket.h:12:1:
+ SO_REUSEPORT = 15 // socket.h:27:1:
+ SO_RXQ_OVFL = 40 // socket.h:61:1:
+ SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
+ SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
+ SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
+ SO_SNDBUF = 7 // socket.h:17:1:
+ SO_SNDBUFFORCE = 32 // socket.h:19:1:
+ SO_SNDLOWAT = 19 // socket.h:32:1:
+ SO_SNDTIMEO = 21 // socket.h:146:1:
+ SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
+ SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
+ SO_TIMESTAMP = 29 // socket.h:141:1:
+ SO_TIMESTAMPING = 37 // socket.h:143:1:
+ SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
+ SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
+ SO_TIMESTAMPNS = 35 // socket.h:142:1:
+ SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
+ SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
+ SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
+ SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXREHASH = 74 // socket.h:131:1:
+ SO_TXTIME = 61 // socket.h:104:1:
+ SO_TYPE = 3 // socket.h:13:1:
+ SO_WIFI_STATUS = 41 // socket.h:63:1:
+ SO_ZEROCOPY = 60 // socket.h:102:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LINUX_STDDEF_H = 0 // stddef.h:3:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_SS_SIZE = 128 // sockaddr.h:40:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_SOCKET_H = 1 // socket.h:20:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Bits in the FLAGS argument to `send', `recv', et al.
-const ( /* socket.h:200:1: */
+const ( /* socket.h:205:1: */
MSG_OOB = 1 // Process out-of-band data.
MSG_PEEK = 2 // Peek at incoming messages.
MSG_DONTROUTE = 4 // Don't use local routing.
@@ -307,13 +332,13 @@ const ( /* socket.h:200:1: */
// Socket level message types. This must match the definitions in
//
// <linux/socket.h>.
-const ( /* socket.h:332:1: */
+const ( /* socket.h:363:1: */
SCM_RIGHTS = 1
)
// Get the architecture-dependent definition of enum __socket_type.
// Define enum __socket_type for generic Linux.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -393,10 +418,10 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Structure for scatter/gather I/O.
type Iovec = struct {
Fiov_base uintptr
- Fiov_len Size_t
+ Fiov_len uint64
} /* struct_iovec.h:26:1 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -468,7 +493,7 @@ type Iovec = struct {
// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
// `struct msghdr', and `struct linger' types.
// System-specific socket constants and types. Linux version.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -485,7 +510,7 @@ type Iovec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -553,7 +578,7 @@ type Iovec = struct {
// A null pointer constant.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -572,7 +597,7 @@ type Iovec = struct {
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -590,7 +615,7 @@ type Iovec = struct {
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -609,7 +634,7 @@ type Iovec = struct {
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -626,11 +651,25 @@ type Iovec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -647,7 +686,7 @@ type Iovec = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -666,14 +705,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -713,8 +752,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -728,14 +767,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -746,10 +783,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -776,7 +815,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -788,101 +827,102 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -902,10 +942,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -925,10 +965,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -948,10 +988,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -971,9 +1011,9 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
-// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+// Copyright (C) 1989-2023 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -1049,7 +1089,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1067,7 +1107,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1086,22 +1126,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1120,7 +1160,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1139,7 +1179,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1159,7 +1199,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1176,9 +1216,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1190,7 +1229,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1213,14 +1252,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1240,7 +1279,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1261,11 +1300,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -1274,25 +1313,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1311,7 +1350,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1350,7 +1389,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1365,24 +1406,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1399,9 +1425,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1418,56 +1443,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
-//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -1483,8 +1478,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1501,16 +1496,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -1523,9 +1522,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1542,6 +1558,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -1549,26 +1570,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -1611,7 +1635,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
@@ -1635,7 +1663,7 @@ type Pthread_barrierattr_t = struct {
} /* pthreadtypes.h:118:3 */
// Type for length arguments in socket calls.
-type Socklen_t = X__socklen_t /* socket.h:33:21 */
+type Socklen_t = uint32 /* socket.h:33:21 */
// Protocol families.
@@ -1650,7 +1678,7 @@ type Socklen_t = X__socklen_t /* socket.h:33:21 */
// Get the definition of the macro to define the common sockaddr members.
// Definition of struct sockaddr_* common members and sizes, generic version.
-// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// Copyright (C) 1995-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1680,41 +1708,41 @@ type Sa_family_t = uint16 /* sockaddr.h:28:28 */
// Structure describing a generic socket address.
type Sockaddr = struct {
- Fsa_family Sa_family_t
+ Fsa_family uint16
Fsa_data [14]int8
-} /* socket.h:178:1 */
+} /* socket.h:183:1 */
// Structure large enough to hold any socket address (with the historical
// exception of AF_UNIX).
type Sockaddr_storage = struct {
- Fss_family Sa_family_t
+ Fss_family uint16
F__ss_padding [118]int8
F__ss_align uint64
-} /* socket.h:191:1 */
+} /* socket.h:196:1 */
// Structure describing messages sent by
//
// `sendmsg' and received by `recvmsg'.
type Msghdr = struct {
Fmsg_name uintptr
- Fmsg_namelen Socklen_t
+ Fmsg_namelen uint32
F__ccgo_pad1 [4]byte
Fmsg_iov uintptr
- Fmsg_iovlen Size_t
+ Fmsg_iovlen uint64
Fmsg_control uintptr
- Fmsg_controllen Size_t
+ Fmsg_controllen uint64
Fmsg_flags int32
F__ccgo_pad2 [4]byte
-} /* socket.h:257:1 */
+} /* socket.h:262:1 */
// Structure used for storage of ancillary data object information.
type Cmsghdr = struct {
F__ccgo_pad1 [0]uint64
- Fcmsg_len Size_t
+ Fcmsg_len uint64
Fcmsg_level int32
Fcmsg_type int32
-} /* socket.h:275:1 */
+} /* socket.h:280:1 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -1722,6 +1750,31 @@ type Cmsghdr = struct {
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// *
+// __struct_group() - Create a mirrored named and anonyomous struct
+//
+// @TAG: The tag name for the named sub-struct (usually empty)
+// @NAME: The identifier name of the mirrored sub-struct
+// @ATTRS: Any struct attributes (usually empty)
+// @MEMBERS: The member declarations for the mirrored structs
+//
+// Used to create an anonymous union of two structs with identical layout
+// and size: one anonymous and one named. The former's members can be used
+// normally without sub-struct naming, and the latter can be used to
+// reason about the start, end, and size of the group of struct members.
+// The named struct can also be explicitly tagged for layer reuse, as well
+// as both having struct attributes appended.
+
+// *
+// __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+//
+// @TYPE: The type of each flexible array element
+// @NAME: The name of the flexible array member
+//
+// In order to have a flexible array member in a union or alone in a
+// struct, it needs to be wrapped in an anonymous struct with at least 1
+// named member, but that member can be empty.
+
// This allows for 1024 file descriptors: if NR_OPEN is ever grown
// beyond that you'll have to change this too. But 1024 fd's seem to be
// enough even for such "real" unices like OSF/1, so hopefully this is
@@ -1744,28 +1797,14 @@ type X__kernel_key_t = int32 /* posix_types.h:33:13 */
type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// This file is generally used by user-level software, so you need to
-// be a little careful about namespace pollution etc. Also, we cannot
-// assume GCC is being used.
-
-type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
-type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
-
-type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
-
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
-
-// There seems to be no way of detecting this automatically from user
-// space, so 64 bit architectures should override this in their
-// bitsperlong.h. In particular, an architecture that supports
-// both 32 and 64 bit user space must not rely on CONFIG_64BIT
-// to decide it, but rather check a compiler provided macro.
+// In order to keep safe and avoid regression, only unify uapi
+// bitsperlong.h for some archs which are using newer toolchains
+// that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
+// See the following link for more info:
+// https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/
// This file is generally used by user-level software, so you need to
// be a little careful about namespace pollution etc.
@@ -1776,7 +1815,7 @@ type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
type X__kernel_long_t = int64 /* posix_types.h:15:15 */
type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
-type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+type X__kernel_ino_t = uint64 /* posix_types.h:20:26 */
type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
@@ -1787,33 +1826,38 @@ type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
-type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+type X__kernel_suseconds_t = int64 /* posix_types.h:41:26 */
type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+type X__kernel_old_uid_t = uint32 /* posix_types.h:54:24 */
+type X__kernel_old_gid_t = uint32 /* posix_types.h:55:24 */
+
+type X__kernel_old_dev_t = uint32 /* posix_types.h:59:22 */
+
// Most 32 bit architectures use "unsigned int" size_t,
// and all 64 bit architectures use "unsigned long" size_t.
-type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
-type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
-type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+type X__kernel_size_t = uint64 /* posix_types.h:72:26 */
+type X__kernel_ssize_t = int64 /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = int64 /* posix_types.h:74:25 */
type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
// anything below here should be completely generic
-type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
-type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
-type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
-type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
-type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
-type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
-type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
-type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
-type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
-type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
-type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+type X__kernel_off_t = int64 /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = int64 /* posix_types.h:89:25 */
+type X__kernel_time_t = int64 /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = int64 /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -1833,7 +1877,7 @@ type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
type Linger = struct {
Fl_onoff int32
Fl_linger int32
-} /* socket.h:361:1 */
+} /* socket.h:392:1 */
// This is the 4.3 BSD `struct sockaddr' format, which is used as wire
//
diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_mips64le.go b/vendor/modernc.org/libc/sys/socket/socket_linux_mips64le.go
new file mode 100644
index 000000000..c5ca270fe
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/socket/socket_linux_mips64le.go
@@ -0,0 +1,1848 @@
+// 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_linux_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_ALG = 38 // socket.h:133:1:
+ AF_APPLETALK = 5 // socket.h:99:1:
+ AF_ASH = 18 // socket.h:113:1:
+ AF_ATMPVC = 8 // socket.h:102:1:
+ AF_ATMSVC = 20 // socket.h:115:1:
+ AF_AX25 = 3 // socket.h:97:1:
+ AF_BLUETOOTH = 31 // socket.h:126:1:
+ AF_BRIDGE = 7 // socket.h:101:1:
+ AF_CAIF = 37 // socket.h:132:1:
+ AF_CAN = 29 // socket.h:124:1:
+ AF_DECnet = 12 // socket.h:106:1:
+ AF_ECONET = 19 // socket.h:114:1:
+ AF_FILE = 1 // socket.h:95:1:
+ AF_IB = 27 // socket.h:122:1:
+ AF_IEEE802154 = 36 // socket.h:131:1:
+ AF_INET = 2 // socket.h:96:1:
+ AF_INET6 = 10 // socket.h:104:1:
+ AF_IPX = 4 // socket.h:98:1:
+ AF_IRDA = 23 // socket.h:118:1:
+ AF_ISDN = 34 // socket.h:129:1:
+ AF_IUCV = 32 // socket.h:127:1:
+ AF_KCM = 41 // socket.h:136:1:
+ AF_KEY = 15 // socket.h:109:1:
+ AF_LLC = 26 // socket.h:121:1:
+ AF_LOCAL = 1 // socket.h:93:1:
+ AF_MAX = 45 // socket.h:140:1:
+ AF_MPLS = 28 // socket.h:123:1:
+ AF_NETBEUI = 13 // socket.h:107:1:
+ AF_NETLINK = 16 // socket.h:110:1:
+ AF_NETROM = 6 // socket.h:100:1:
+ AF_NFC = 39 // socket.h:134:1:
+ AF_PACKET = 17 // socket.h:112:1:
+ AF_PHONET = 35 // socket.h:130:1:
+ AF_PPPOX = 24 // socket.h:119:1:
+ AF_QIPCRTR = 42 // socket.h:137:1:
+ AF_RDS = 21 // socket.h:116:1:
+ AF_ROSE = 11 // socket.h:105:1:
+ AF_ROUTE = 16 // socket.h:111:1:
+ AF_RXRPC = 33 // socket.h:128:1:
+ AF_SECURITY = 14 // socket.h:108:1:
+ AF_SMC = 43 // socket.h:138:1:
+ AF_SNA = 22 // socket.h:117:1:
+ AF_TIPC = 30 // socket.h:125:1:
+ AF_UNIX = 1 // socket.h:94:1:
+ AF_UNSPEC = 0 // socket.h:92:1:
+ AF_VSOCK = 40 // socket.h:135:1:
+ AF_WANPIPE = 25 // socket.h:120:1:
+ AF_X25 = 9 // socket.h:103:1:
+ AF_XDP = 44 // socket.h:139:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ FIOGETOWN = 0x8903 // sockios.h:8:1:
+ FIOSETOWN = 0x8901 // sockios.h:6:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ PF_ALG = 38 // socket.h:82:1:
+ PF_APPLETALK = 5 // socket.h:48:1:
+ PF_ASH = 18 // socket.h:62:1:
+ PF_ATMPVC = 8 // socket.h:51:1:
+ PF_ATMSVC = 20 // socket.h:64:1:
+ PF_AX25 = 3 // socket.h:46:1:
+ PF_BLUETOOTH = 31 // socket.h:75:1:
+ PF_BRIDGE = 7 // socket.h:50:1:
+ PF_CAIF = 37 // socket.h:81:1:
+ PF_CAN = 29 // socket.h:73:1:
+ PF_DECnet = 12 // socket.h:55:1:
+ PF_ECONET = 19 // socket.h:63:1:
+ PF_FILE = 1 // socket.h:44:1:
+ PF_IB = 27 // socket.h:71:1:
+ PF_IEEE802154 = 36 // socket.h:80:1:
+ PF_INET = 2 // socket.h:45:1:
+ PF_INET6 = 10 // socket.h:53:1:
+ PF_IPX = 4 // socket.h:47:1:
+ PF_IRDA = 23 // socket.h:67:1:
+ PF_ISDN = 34 // socket.h:78:1:
+ PF_IUCV = 32 // socket.h:76:1:
+ PF_KCM = 41 // socket.h:85:1:
+ PF_KEY = 15 // socket.h:58:1:
+ PF_LLC = 26 // socket.h:70:1:
+ PF_LOCAL = 1 // socket.h:42:1:
+ PF_MAX = 45 // socket.h:89:1:
+ PF_MPLS = 28 // socket.h:72:1:
+ PF_NETBEUI = 13 // socket.h:56:1:
+ PF_NETLINK = 16 // socket.h:59:1:
+ PF_NETROM = 6 // socket.h:49:1:
+ PF_NFC = 39 // socket.h:83:1:
+ PF_PACKET = 17 // socket.h:61:1:
+ PF_PHONET = 35 // socket.h:79:1:
+ PF_PPPOX = 24 // socket.h:68:1:
+ PF_QIPCRTR = 42 // socket.h:86:1:
+ PF_RDS = 21 // socket.h:65:1:
+ PF_ROSE = 11 // socket.h:54:1:
+ PF_ROUTE = 16 // socket.h:60:1:
+ PF_RXRPC = 33 // socket.h:77:1:
+ PF_SECURITY = 14 // socket.h:57:1:
+ PF_SMC = 43 // socket.h:87:1:
+ PF_SNA = 22 // socket.h:66:1:
+ PF_TIPC = 30 // socket.h:74:1:
+ PF_UNIX = 1 // socket.h:43:1:
+ PF_UNSPEC = 0 // socket.h:41:1:
+ PF_VSOCK = 40 // socket.h:84:1:
+ PF_WANPIPE = 25 // socket.h:69:1:
+ PF_X25 = 9 // socket.h:52:1:
+ PF_XDP = 44 // socket.h:88:1:
+ SCM_TIMESTAMP = 29 // socket.h:140:1:
+ SCM_TIMESTAMPING = 37 // socket.h:142:1:
+ SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1:
+ SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1:
+ SCM_TIMESTAMPNS = 35 // socket.h:141:1:
+ SCM_TXTIME = 61 // socket.h:105:1:
+ SCM_WIFI_STATUS = 41 // socket.h:64:1:
+ SIOCATMARK = 0x8905 // sockios.h:10:1:
+ SIOCGPGRP = 0x8904 // sockios.h:9:1:
+ SIOCGSTAMP = 0x8906 // sockios.h:11:1:
+ SIOCGSTAMPNS = 0x8907 // sockios.h:12:1:
+ SIOCSPGRP = 0x8902 // sockios.h:7:1:
+ SOL_AAL = 265 // socket.h:151:1:
+ SOL_ALG = 279 // socket.h:165:1:
+ SOL_ATM = 264 // socket.h:150:1:
+ SOL_BLUETOOTH = 274 // socket.h:160:1:
+ SOL_CAIF = 278 // socket.h:164:1:
+ SOL_DCCP = 269 // socket.h:155:1:
+ SOL_DECNET = 261 // socket.h:147:1:
+ SOL_IRDA = 266 // socket.h:152:1:
+ SOL_IUCV = 277 // socket.h:163:1:
+ SOL_KCM = 281 // socket.h:167:1:
+ SOL_LLC = 268 // socket.h:154:1:
+ SOL_NETBEUI = 267 // socket.h:153:1:
+ SOL_NETLINK = 270 // socket.h:156:1:
+ SOL_NFC = 280 // socket.h:166:1:
+ SOL_PACKET = 263 // socket.h:149:1:
+ SOL_PNPIPE = 275 // socket.h:161:1:
+ SOL_PPPOL2TP = 273 // socket.h:159:1:
+ SOL_RAW = 255 // socket.h:146:1:
+ SOL_RDS = 276 // socket.h:162:1:
+ SOL_RXRPC = 272 // socket.h:158:1:
+ SOL_SOCKET = 1 // socket.h:9:1:
+ SOL_TIPC = 271 // socket.h:157:1:
+ SOL_TLS = 282 // socket.h:168:1:
+ SOL_X25 = 262 // socket.h:148:1:
+ SOL_XDP = 283 // socket.h:169:1:
+ SOMAXCONN = 4096 // socket.h:172:1:
+ SO_ACCEPTCONN = 30 // socket.h:51:1:
+ SO_ATTACH_BPF = 50 // socket.h:82:1:
+ SO_ATTACH_FILTER = 26 // socket.h:45:1:
+ SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1:
+ SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1:
+ SO_BINDTODEVICE = 25 // socket.h:42:1:
+ SO_BINDTOIFINDEX = 62 // socket.h:107:1:
+ SO_BPF_EXTENSIONS = 48 // socket.h:78:1:
+ SO_BROADCAST = 6 // socket.h:16:1:
+ SO_BSDCOMPAT = 14 // socket.h:26:1:
+ SO_BUSY_POLL = 46 // socket.h:74:1:
+ SO_CNX_ADVICE = 53 // socket.h:88:1:
+ SO_COOKIE = 57 // socket.h:96:1:
+ SO_DEBUG = 1 // socket.h:11:1:
+ SO_DETACH_BPF = 27 // socket.h:83:1:
+ SO_DETACH_FILTER = 27 // socket.h:46:1:
+ SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1:
+ SO_DOMAIN = 39 // socket.h:59:1:
+ SO_DONTROUTE = 5 // socket.h:15:1:
+ SO_ERROR = 4 // socket.h:14:1:
+ SO_GET_FILTER = 26 // socket.h:47:1:
+ SO_INCOMING_CPU = 49 // socket.h:80:1:
+ SO_INCOMING_NAPI_ID = 56 // socket.h:94:1:
+ SO_KEEPALIVE = 9 // socket.h:21:1:
+ SO_LINGER = 13 // socket.h:25:1:
+ SO_LOCK_FILTER = 44 // socket.h:70:1:
+ SO_MARK = 36 // socket.h:56:1:
+ SO_MAX_PACING_RATE = 47 // socket.h:76:1:
+ SO_MEMINFO = 55 // socket.h:92:1:
+ SO_NOFCS = 43 // socket.h:68:1:
+ SO_NO_CHECK = 11 // socket.h:23:1:
+ SO_OOBINLINE = 10 // socket.h:22:1:
+ SO_PASSCRED = 16 // socket.h:29:1:
+ SO_PASSSEC = 34 // socket.h:54:1:
+ SO_PEEK_OFF = 42 // socket.h:65:1:
+ SO_PEERCRED = 17 // socket.h:30:1:
+ SO_PEERGROUPS = 59 // socket.h:100:1:
+ SO_PEERNAME = 28 // socket.h:49:1:
+ SO_PEERSEC = 31 // socket.h:53:1:
+ SO_PRIORITY = 12 // socket.h:24:1:
+ SO_PROTOCOL = 38 // socket.h:58:1:
+ SO_RCVBUF = 8 // socket.h:18:1:
+ SO_RCVBUFFORCE = 33 // socket.h:20:1:
+ SO_RCVLOWAT = 18 // socket.h:31:1:
+ SO_RCVTIMEO = 20 // socket.h:129:1:
+ SO_RCVTIMEO_NEW = 66 // socket.h:117:1:
+ SO_RCVTIMEO_OLD = 20 // socket.h:33:1:
+ SO_REUSEADDR = 2 // socket.h:12:1:
+ SO_REUSEPORT = 15 // socket.h:27:1:
+ SO_RXQ_OVFL = 40 // socket.h:61:1:
+ SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1:
+ SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1:
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1:
+ SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1:
+ SO_SNDBUF = 7 // socket.h:17:1:
+ SO_SNDBUFFORCE = 32 // socket.h:19:1:
+ SO_SNDLOWAT = 19 // socket.h:32:1:
+ SO_SNDTIMEO = 21 // socket.h:130:1:
+ SO_SNDTIMEO_NEW = 67 // socket.h:118:1:
+ SO_SNDTIMEO_OLD = 21 // socket.h:34:1:
+ SO_TIMESTAMP = 29 // socket.h:125:1:
+ SO_TIMESTAMPING = 37 // socket.h:127:1:
+ SO_TIMESTAMPING_NEW = 65 // socket.h:115:1:
+ SO_TIMESTAMPING_OLD = 37 // socket.h:111:1:
+ SO_TIMESTAMPNS = 35 // socket.h:126:1:
+ SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1:
+ SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1:
+ SO_TIMESTAMP_NEW = 63 // socket.h:113:1:
+ SO_TIMESTAMP_OLD = 29 // socket.h:109:1:
+ SO_TXTIME = 61 // socket.h:104:1:
+ SO_TYPE = 3 // socket.h:13:1:
+ SO_WIFI_STATUS = 41 // socket.h:63:1:
+ SO_ZEROCOPY = 60 // socket.h:102:1:
+ X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_SS_SIZE = 128 // sockaddr.h:40:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_SOCKET_H = 1 // socket.h:20:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Bits in the FLAGS argument to `send', `recv', et al.
+const ( /* socket.h:200:1: */
+ MSG_OOB = 1 // Process out-of-band data.
+ MSG_PEEK = 2 // Peek at incoming messages.
+ MSG_DONTROUTE = 4 // Don't use local routing.
+ MSG_CTRUNC = 8 // Control data lost before delivery.
+ MSG_PROXY = 16 // Supply or ask second address.
+ MSG_TRUNC = 32
+ MSG_DONTWAIT = 64 // Nonblocking IO.
+ MSG_EOR = 128 // End of record.
+ MSG_WAITALL = 256 // Wait for a full request.
+ MSG_FIN = 512
+ MSG_SYN = 1024
+ MSG_CONFIRM = 2048 // Confirm path validity.
+ MSG_RST = 4096
+ MSG_ERRQUEUE = 8192 // Fetch message from error queue.
+ MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE.
+ MSG_MORE = 32768 // Sender will send more.
+ MSG_WAITFORONE = 65536 // Wait for at least one packet to return.
+ MSG_BATCH = 262144 // sendmmsg: more messages coming.
+ MSG_ZEROCOPY = 67108864 // Use user data in kernel path.
+ MSG_FASTOPEN = 536870912 // Send data in TCP SYN.
+
+ MSG_CMSG_CLOEXEC = 1073741824
+)
+
+// Socket level message types. This must match the definitions in
+//
+// <linux/socket.h>.
+const ( /* socket.h:332:1: */
+ SCM_RIGHTS = 1
+)
+
+// Get the architecture-dependent definition of enum __socket_type.
+// Define enum __socket_type for generic Linux.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Types of sockets.
+const ( /* socket_type.h:24:1: */
+ SOCK_STREAM = 1 // Sequenced, reliable, connection-based
+ // byte streams.
+ SOCK_DGRAM = 2 // Connectionless, unreliable datagrams
+ // of fixed maximum length.
+ SOCK_RAW = 3 // Raw protocol interface.
+ SOCK_RDM = 4 // Reliably-delivered messages.
+ SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based,
+ // datagrams of fixed maximum length.
+ SOCK_DCCP = 6 // Datagram Congestion Control Protocol.
+ SOCK_PACKET = 10 // Linux specific way of getting packets
+ // at the dev level. For writing rarp and
+ // other similar things on the user level.
+
+ // Flags to be ORed into the type parameter of socket and socketpair and
+ // used for the flags parameter of paccept.
+
+ SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the
+ // new descriptor(s).
+ SOCK_NONBLOCK = 2048
+)
+
+// The following constants should be used for the second parameter of
+//
+// `shutdown'.
+const ( /* socket.h:41:1: */
+ SHUT_RD = 0 // No more receptions.
+ SHUT_WR = 1 // No more transmissions.
+ SHUT_RDWR = 2
+)
+
+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 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Structure for scatter/gather I/O.
+type Iovec = struct {
+ Fiov_base uintptr
+ Fiov_len Size_t
+} /* struct_iovec.h:26:1 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This operating system-specific header file defines the SOCK_*, PF_*,
+// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
+// `struct msghdr', and `struct linger' types.
+// System-specific socket constants and types. Linux version.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Type for length arguments in socket calls.
+type Socklen_t = X__socklen_t /* socket.h:33:21 */
+
+// Protocol families.
+
+// Address families.
+
+// Socket level values. Others are defined in the appropriate headers.
+//
+// XXX These definitions also should go into the appropriate headers as
+// far as they are available.
+
+// Maximum queue length specifiable by listen.
+
+// Get the definition of the macro to define the common sockaddr members.
+// Definition of struct sockaddr_* common members and sizes, generic version.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/socket.h> instead.
+
+// POSIX.1g specifies this type name for the `sa_family' member.
+type Sa_family_t = uint16 /* sockaddr.h:28:28 */
+
+// This macro is used to declare the initial common members
+// of the data types used for socket addresses, `struct sockaddr',
+// `struct sockaddr_in', `struct sockaddr_un', etc.
+
+// Size of struct sockaddr_storage.
+
+// Structure describing a generic socket address.
+type Sockaddr = struct {
+ Fsa_family Sa_family_t
+ Fsa_data [14]int8
+} /* socket.h:178:1 */
+
+// Structure large enough to hold any socket address (with the historical
+// exception of AF_UNIX).
+
+type Sockaddr_storage = struct {
+ Fss_family Sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
+} /* socket.h:191:1 */
+
+// Structure describing messages sent by
+//
+// `sendmsg' and received by `recvmsg'.
+type Msghdr = struct {
+ Fmsg_name uintptr
+ Fmsg_namelen Socklen_t
+ F__ccgo_pad1 [4]byte
+ Fmsg_iov uintptr
+ Fmsg_iovlen Size_t
+ Fmsg_control uintptr
+ Fmsg_controllen Size_t
+ Fmsg_flags int32
+ F__ccgo_pad2 [4]byte
+} /* socket.h:257:1 */
+
+// Structure used for storage of ancillary data object information.
+type Cmsghdr = struct {
+ F__ccgo_pad1 [0]uint64
+ Fcmsg_len Size_t
+ Fcmsg_level int32
+ Fcmsg_type int32
+} /* socket.h:275:1 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This allows for 1024 file descriptors: if NR_OPEN is ever grown
+// beyond that you'll have to change this too. But 1024 fd's seem to be
+// enough even for such "real" unices like OSF/1, so hopefully this is
+// one limit that doesn't have to be changed [again].
+//
+// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
+// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
+// place for them. Solved by having dummy defines in <sys/time.h>.
+
+// This macro may have been defined in <gnu/types.h>. But we always
+// use the one here.
+
+type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
+
+// Type of a signal handler.
+type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
+
+// Type of a SYSV IPC key.
+type X__kernel_key_t = int32 /* posix_types.h:33:13 */
+type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc. Also, we cannot
+// assume GCC is being used.
+
+type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */
+type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */
+
+type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// There seems to be no way of detecting this automatically from user
+// space, so 64 bit architectures should override this in their
+// bitsperlong.h. In particular, an architecture that supports
+// both 32 and 64 bit user space must not rely on CONFIG_64BIT
+// to decide it, but rather check a compiler provided macro.
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc.
+//
+// First the types that are often defined in different ways across
+// architectures, so that you can override them.
+
+type X__kernel_long_t = int64 /* posix_types.h:15:15 */
+type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
+
+type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */
+
+type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */
+
+type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
+
+type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */
+
+type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */
+type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */
+
+type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+
+type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
+
+type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
+type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+
+// Most 32 bit architectures use "unsigned int" size_t,
+// and all 64 bit architectures use "unsigned long" size_t.
+type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */
+type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */
+type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */
+
+type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
+
+// anything below here should be completely generic
+type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */
+type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:91:19 */
+type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:93:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// Socket-level I/O control calls.
+
+// For setsockopt(2)
+
+// Security levels - as per NRL IPv6 - don't actually do anything
+
+// Socket filtering
+
+// Instruct lower device to use last 4-bytes of skb data as FCS
+
+// on 64-bit and x32, avoid the ?: operator
+
+// Structure used to manipulate the SO_LINGER option.
+type Linger = struct {
+ Fl_onoff int32
+ Fl_linger int32
+} /* 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.
+type Osockaddr = struct {
+ Fsa_family uint16
+ Fsa_data [14]uint8
+} /* struct_osockaddr.h:6:1 */
+
+// Define some macros helping to catch buffer overflows.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.go b/vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.go
new file mode 100644
index 000000000..5bd145d35
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.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_illumos_amd64.go -pkgname stat', DO NOT EDIT.
+
+package stat
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go
index 7ab15123b..005ccface 100644
--- a/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.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 -ignore-unsupported-alignment -o sys/stat/stat_linux_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_linux_loong64.go -pkgname stat', DO NOT EDIT.
package stat
diff --git a/vendor/modernc.org/libc/sys/stat/capi_linux_mips64le.go b/vendor/modernc.org/libc/sys/stat/capi_linux_mips64le.go
new file mode 100644
index 000000000..7ab15123b
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/stat/capi_linux_mips64le.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_linux_amd64.go -pkgname stat', DO NOT EDIT.
+
+package stat
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go
new file mode 100644
index 000000000..2f6095587
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go
@@ -0,0 +1,2941 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ S_ENFMT = 1024 // stat.h:426:1:
+ S_IAMB = 0x1FF // stat.h:406:1:
+ S_IEXEC = 00100 // stat.h:425:1:
+ S_IFBLK = 0x6000 // stat.h:414:1:
+ S_IFCHR = 0x2000 // stat.h:408:1:
+ S_IFDIR = 0x4000 // stat.h:409:1:
+ S_IFDOOR = 0xD000 // stat.h:418:1:
+ S_IFIFO = 0x1000 // stat.h:407:1:
+ S_IFLNK = 0xA000 // stat.h:416:1:
+ S_IFMT = 0xF000 // stat.h:405:1:
+ S_IFNAM = 0x5000 // stat.h:411:1:
+ S_IFPORT = 0xE000 // stat.h:419:1:
+ S_IFREG = 0x8000 // stat.h:415:1:
+ S_IFSOCK = 0xC000 // stat.h:417:1:
+ S_INSEM = 0x1 // stat.h:412:1:
+ S_INSHD = 0x2 // stat.h:413:1:
+ S_IREAD = 00400 // stat.h:423:1:
+ S_IRGRP = 00040 // stat.h:435:1:
+ S_IROTH = 00004 // stat.h:439:1:
+ S_IRUSR = 00400 // stat.h:431:1:
+ S_IRWXG = 00070 // stat.h:434:1:
+ S_IRWXO = 00007 // stat.h:438:1:
+ S_IRWXU = 00700 // stat.h:430:1:
+ S_ISGID = 0x400 // stat.h:421:1:
+ S_ISUID = 0x800 // stat.h:420:1:
+ S_ISVTX = 0x200 // stat.h:422:1:
+ S_IWGRP = 00020 // stat.h:436:1:
+ S_IWOTH = 00002 // stat.h:440:1:
+ S_IWRITE = 00200 // stat.h:424:1:
+ S_IWUSR = 00200 // stat.h:432:1:
+ S_IXGRP = 00010 // stat.h:437:1:
+ S_IXOTH = 00001 // stat.h:441:1:
+ S_IXUSR = 00100 // stat.h:433:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ UTIME_NOW = -1 // stat.h:478:1:
+ UTIME_OMIT = -2 // stat.h:479:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_ST_FSTYPSZ = 16 // stat.h:60:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_STAT_H = 0 // stat.h:32:1:
+ X_SYS_STAT_IMPL_H = 0 // stat_impl.h:28:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
+// Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
+// Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
+// All Rights Reserved
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// The implementation specific header <sys/time_impl.h> includes a
+// definition for timestruc_t needed by the stat structure. However,
+// including either <time.h>, which includes <sys/time_impl.h>, or
+// including <sys/time_impl.h> directly will break both X/Open and
+// POSIX namespace. Preceeding tag, structure, and structure member
+// names with underscores eliminates the namespace breakage and at the
+// same time, with unique type names, eliminates the possibility of
+// timespec_t or timestruct_t naming conflicts that could otherwise
+// result based on the order of inclusion of <sys/stat.h> and
+// <sys/time.h>. The header <sys/time_std_impl.h> contains the
+// standards namespace safe versions of these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// stat structure, used by stat(2) and fstat(2)
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, map large file interfaces
+// back to native versions where possible.
+
+// User level stat structure definitions.
+
+type Stat = struct {
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ Fst_size int64
+ Fst_atim Timestruc_t
+ Fst_mtim Timestruc_t
+ Fst_ctim Timestruc_t
+ Fst_blksize int32
+ F__ccgo_pad1 [4]byte
+ Fst_blocks int64
+ Fst_fstype [16]int8
+} /* stat.h:217:1 */
+
+// transitional large file interface version
+
+type Stat64 = struct {
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ Fst_size int64
+ Fst_atim Timestruc_t
+ Fst_mtim Timestruc_t
+ Fst_ctim Timestruc_t
+ Fst_blksize int32
+ F__ccgo_pad1 [4]byte
+ Fst_blocks int64
+ Fst_fstype [16]int8
+} /* stat.h:278:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go
index 9c460d3ac..2c950d24d 100644
--- a/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.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 -ignore-unsupported-alignment -o sys/stat/stat_linux_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_linux_loong64.go -pkgname stat', DO NOT EDIT.
package stat
@@ -15,65 +15,72 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- ACCESSPERMS = 511 // stat.h:195:1:
- ALLPERMS = 4095 // stat.h:196:1:
- DEFFILEMODE = 438 // stat.h:197:1:
- S_BLKSIZE = 512 // stat.h:199:1:
- S_IEXEC = 64 // stat.h:177:1:
- S_IFBLK = 24576 // stat.h:107:1:
- S_IFCHR = 8192 // stat.h:106:1:
- S_IFDIR = 16384 // stat.h:105:1:
- S_IFIFO = 4096 // stat.h:110:1:
- S_IFLNK = 40960 // stat.h:113:1:
- S_IFMT = 61440 // stat.h:104:1:
- S_IFREG = 32768 // stat.h:108:1:
- S_IFSOCK = 49152 // stat.h:117:1:
- S_IREAD = 256 // stat.h:175:1:
- S_IRGRP = 32 // stat.h:180:1:
- S_IROTH = 4 // stat.h:186:1:
- S_IRUSR = 256 // stat.h:168:1:
- S_IRWXG = 56 // stat.h:184:1:
- S_IRWXO = 7 // stat.h:190:1:
- S_IRWXU = 448 // stat.h:172:1:
- S_ISGID = 1024 // stat.h:161:1:
- S_ISUID = 2048 // stat.h:160:1:
- S_ISVTX = 512 // stat.h:165:1:
- S_IWGRP = 16 // stat.h:181:1:
- S_IWOTH = 2 // stat.h:187:1:
- S_IWRITE = 128 // stat.h:176:1:
- S_IWUSR = 128 // stat.h:169:1:
- S_IXGRP = 8 // stat.h:182:1:
- S_IXOTH = 1 // stat.h:188:1:
- S_IXUSR = 64 // stat.h:170:1:
- UTIME_NOW = 1073741823 // stat.h:206:1:
- UTIME_OMIT = 1073741822 // stat.h:207:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_STAT_H = 1 // stat.h:23:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_MKNOD_VER = 0 // stat.h:390:1:
- X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
- X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
- X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
- X_STAT_VER = 1 // stat.h:44:1:
- X_STAT_VER_KERNEL = 0 // stat.h:37:1:
- X_STAT_VER_LINUX = 1 // stat.h:38:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_STAT_H = 1 // stat.h:23:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ ACCESSPERMS = 511 // stat.h:195:1:
+ ALLPERMS = 4095 // stat.h:196:1:
+ DEFFILEMODE = 438 // stat.h:197:1:
+ S_BLKSIZE = 512 // stat.h:199:1:
+ S_IEXEC = 64 // stat.h:177:1:
+ S_IFBLK = 24576 // stat.h:107:1:
+ S_IFCHR = 8192 // stat.h:106:1:
+ S_IFDIR = 16384 // stat.h:105:1:
+ S_IFIFO = 4096 // stat.h:110:1:
+ S_IFLNK = 40960 // stat.h:113:1:
+ S_IFMT = 61440 // stat.h:104:1:
+ S_IFREG = 32768 // stat.h:108:1:
+ S_IFSOCK = 49152 // stat.h:117:1:
+ S_IREAD = 256 // stat.h:175:1:
+ S_IRGRP = 32 // stat.h:180:1:
+ S_IROTH = 4 // stat.h:186:1:
+ S_IRUSR = 256 // stat.h:168:1:
+ S_IRWXG = 56 // stat.h:184:1:
+ S_IRWXO = 7 // stat.h:190:1:
+ S_IRWXU = 448 // stat.h:172:1:
+ S_ISGID = 1024 // stat.h:161:1:
+ S_ISUID = 2048 // stat.h:160:1:
+ S_ISVTX = 512 // stat.h:165:1:
+ S_IWGRP = 16 // stat.h:181:1:
+ S_IWOTH = 2 // stat.h:187:1:
+ S_IWRITE = 128 // stat.h:176:1:
+ S_IWUSR = 128 // stat.h:169:1:
+ S_IXGRP = 8 // stat.h:182:1:
+ S_IXOTH = 1 // stat.h:188:1:
+ S_IXUSR = 64 // stat.h:170:1:
+ UTIME_NOW = 1073741823 // stat.h:56:1:
+ UTIME_OMIT = 1073741822 // stat.h:57:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_STRUCT_STAT_H = 1 // struct_stat.h:24:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STATBUF_ST_BLKSIZE = 0 // struct_stat.h:122:1:
+ X_STATBUF_ST_NSEC = 0 // struct_stat.h:125:1:
+ X_STATBUF_ST_RDEV = 0 // struct_stat.h:123:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_STAT_H = 1 // stat.h:23:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -94,7 +101,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -113,7 +120,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 5.6 File Characteristics <sys/stat.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -145,6 +152,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -160,12 +169,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -206,6 +218,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -276,6 +290,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -294,9 +364,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -324,7 +400,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -345,23 +422,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -374,6 +452,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -394,8 +474,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -405,6 +485,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -433,8 +516,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -465,11 +553,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -479,11 +570,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -517,6 +624,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -530,13 +653,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -555,7 +695,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -572,11 +712,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -593,7 +747,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -612,14 +766,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -659,8 +813,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -674,14 +828,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -692,10 +844,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -722,7 +876,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -734,60 +888,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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
@@ -796,7 +951,7 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -816,7 +971,7 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -843,24 +998,13 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
-// POSIX.1b structure for a time value. This is like a `struct timeval' but
-//
-// has nanoseconds instead of microseconds.
-type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
-
-// The Single Unix specification says that some more types are
-// available here.
-
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -880,23 +1024,34 @@ type Timespec = struct {
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
-type Dev_t = X__dev_t /* stat.h:40:17 */
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
+
+// The Single Unix specification says that some more types are
+// available here.
-type Gid_t = X__gid_t /* stat.h:45:17 */
+type Dev_t = uint64 /* stat.h:40:17 */
-type Ino_t = X__ino64_t /* stat.h:53:19 */
+type Gid_t = uint32 /* stat.h:45:17 */
-type Mode_t = X__mode_t /* stat.h:59:18 */
+type Ino_t = uint64 /* stat.h:53:19 */
-type Nlink_t = X__nlink_t /* stat.h:64:19 */
+type Mode_t = uint32 /* stat.h:59:18 */
-type Off_t = X__off64_t /* stat.h:72:19 */
+type Nlink_t = uint32 /* stat.h:64:19 */
-type Uid_t = X__uid_t /* stat.h:78:17 */
+type Off_t = int64 /* stat.h:72:19 */
-// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+type Uid_t = uint32 /* stat.h:78:17 */
+
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -913,35 +1068,85 @@ type Uid_t = X__uid_t /* stat.h:78:17 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Versions of the `struct stat' data structure.
+// Definition for struct stat.
+// Copyright (C) 2020-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
-// x86-64 versions of the `xmknod' interface.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
type Stat = struct {
- Fst_dev X__dev_t
- Fst_ino X__ino_t
- Fst_nlink X__nlink_t
- Fst_mode X__mode_t
- Fst_uid X__uid_t
- Fst_gid X__gid_t
- F__pad0 int32
- Fst_rdev X__dev_t
- Fst_size X__off_t
- Fst_blksize X__blksize_t
- Fst_blocks X__blkcnt_t
+ Fst_dev uint64
+ Fst_ino uint64
+ Fst_mode uint32
+ Fst_nlink uint32
+ Fst_uid uint32
+ Fst_gid uint32
+ Fst_rdev uint64
+ F__pad1 uint64
+ Fst_size int64
+ Fst_blksize int32
+ F__pad2 int32
+ Fst_blocks int64
Fst_atim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_mtim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fst_ctim struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
- F__glibc_reserved [3]X__syscall_slong_t
-} /* stat.h:46:1 */
+ F__glibc_reserved [2]int32
+} /* struct_stat.h:44:1 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_mips64le.go b/vendor/modernc.org/libc/sys/stat/stat_linux_mips64le.go
new file mode 100644
index 000000000..9c460d3ac
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/stat/stat_linux_mips64le.go
@@ -0,0 +1,947 @@
+// 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_linux_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:195:1:
+ ALLPERMS = 4095 // stat.h:196:1:
+ DEFFILEMODE = 438 // stat.h:197:1:
+ S_BLKSIZE = 512 // stat.h:199:1:
+ S_IEXEC = 64 // stat.h:177:1:
+ S_IFBLK = 24576 // stat.h:107:1:
+ S_IFCHR = 8192 // stat.h:106:1:
+ S_IFDIR = 16384 // stat.h:105:1:
+ S_IFIFO = 4096 // stat.h:110:1:
+ S_IFLNK = 40960 // stat.h:113:1:
+ S_IFMT = 61440 // stat.h:104:1:
+ S_IFREG = 32768 // stat.h:108:1:
+ S_IFSOCK = 49152 // stat.h:117:1:
+ S_IREAD = 256 // stat.h:175:1:
+ S_IRGRP = 32 // stat.h:180:1:
+ S_IROTH = 4 // stat.h:186:1:
+ S_IRUSR = 256 // stat.h:168:1:
+ S_IRWXG = 56 // stat.h:184:1:
+ S_IRWXO = 7 // stat.h:190:1:
+ S_IRWXU = 448 // stat.h:172:1:
+ S_ISGID = 1024 // stat.h:161:1:
+ S_ISUID = 2048 // stat.h:160:1:
+ S_ISVTX = 512 // stat.h:165:1:
+ S_IWGRP = 16 // stat.h:181:1:
+ S_IWOTH = 2 // stat.h:187:1:
+ S_IWRITE = 128 // stat.h:176:1:
+ S_IWUSR = 128 // stat.h:169:1:
+ S_IXGRP = 8 // stat.h:182:1:
+ S_IXOTH = 1 // stat.h:188:1:
+ S_IXUSR = 64 // stat.h:170:1:
+ UTIME_NOW = 1073741823 // stat.h:206:1:
+ UTIME_OMIT = 1073741822 // stat.h:207:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_STAT_H = 1 // stat.h:23:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_MKNOD_VER = 0 // stat.h:390:1:
+ X_MKNOD_VER_LINUX = 0 // stat.h:41:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1:
+ X_STATBUF_ST_NSEC = 0 // stat.h:175:1:
+ X_STATBUF_ST_RDEV = 0 // stat.h:173:1:
+ X_STAT_VER = 1 // stat.h:44:1:
+ X_STAT_VER_KERNEL = 0 // stat.h:37:1:
+ X_STAT_VER_LINUX = 1 // stat.h:38:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_STAT_H = 1 // stat.h:23:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 5.6 File Characteristics <sys/stat.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+// The Single Unix specification says that some more types are
+// available here.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+type Dev_t = X__dev_t /* stat.h:40:17 */
+
+type Gid_t = X__gid_t /* stat.h:45:17 */
+
+type Ino_t = X__ino64_t /* stat.h:53:19 */
+
+type Mode_t = X__mode_t /* stat.h:59:18 */
+
+type Nlink_t = X__nlink_t /* stat.h:64:19 */
+
+type Off_t = X__off64_t /* stat.h:72:19 */
+
+type Uid_t = X__uid_t /* stat.h:78:17 */
+
+// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Versions of the `struct stat' data structure.
+
+// x86-64 versions of the `xmknod' interface.
+
+type Stat = struct {
+ Fst_dev X__dev_t
+ Fst_ino X__ino_t
+ Fst_nlink X__nlink_t
+ Fst_mode X__mode_t
+ Fst_uid X__uid_t
+ Fst_gid X__gid_t
+ F__pad0 int32
+ Fst_rdev X__dev_t
+ Fst_size X__off_t
+ Fst_blksize X__blksize_t
+ Fst_blocks X__blkcnt_t
+ Fst_atim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_mtim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fst_ctim struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ F__glibc_reserved [3]X__syscall_slong_t
+} /* stat.h:46:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/types/capi_illumos_amd64.go b/vendor/modernc.org/libc/sys/types/capi_illumos_amd64.go
new file mode 100644
index 000000000..137dc7232
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/types/capi_illumos_amd64.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_illumos_amd64.go -pkgname types', DO NOT EDIT.
+
+package types
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go
index 762800655..29e8de38e 100644
--- a/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/types/capi_linux_loong64.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 -ignore-unsupported-alignment -o sys/types/types_linux_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_linux_loong64.go -pkgname types', DO NOT EDIT.
package types
diff --git a/vendor/modernc.org/libc/sys/types/capi_linux_mips64le.go b/vendor/modernc.org/libc/sys/types/capi_linux_mips64le.go
new file mode 100644
index 000000000..762800655
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/types/capi_linux_mips64le.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_linux_amd64.go -pkgname types', DO NOT EDIT.
+
+package types
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/sys/types/types_illumos_amd64.go b/vendor/modernc.org/libc/sys/types/types_illumos_amd64.go
new file mode 100644
index 000000000..1792a9a9b
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/types/types_illumos_amd64.go
@@ -0,0 +1,2693 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/sys/types/types_linux_loong64.go b/vendor/modernc.org/libc/sys/types/types_linux_loong64.go
index 8a758d4cd..dec9daa5a 100644
--- a/vendor/modernc.org/libc/sys/types/types_linux_loong64.go
+++ b/vendor/modernc.org/libc/sys/types/types_linux_loong64.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 -ignore-unsupported-alignment -o sys/types/types_linux_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_linux_loong64.go -pkgname types', DO NOT EDIT.
package types
@@ -15,51 +15,62 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- BIG_ENDIAN = 4321 // endian.h:28:1:
- BYTE_ORDER = 1234 // endian.h:30:1:
- FD_SETSIZE = 1024 // select.h:73:1:
- LITTLE_ENDIAN = 1234 // endian.h:27:1:
- PDP_ENDIAN = 3412 // endian.h:29:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
- X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
- X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_ENDIAN_H = 1 // endian.h:19:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SELECT_H = 1 // select.h:22:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_SYS_TYPES_H = 1 // types.h:23:1:
- X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
- X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ BIG_ENDIAN = 4321 // endian.h:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ATOMIC_WIDE_COUNTER_H = 0 // atomic_wide_counter.h:20:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:21:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -80,7 +91,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -99,7 +110,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -131,6 +142,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -146,12 +159,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -192,6 +208,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -262,6 +280,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -280,9 +354,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -310,7 +390,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -331,23 +412,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -360,6 +442,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -380,8 +464,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -391,6 +475,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -419,8 +506,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -451,11 +543,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -465,11 +560,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -503,6 +614,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -516,13 +643,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -541,7 +685,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -558,11 +702,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -579,7 +737,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -598,14 +756,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -645,8 +803,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -660,14 +818,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -678,10 +834,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -708,7 +866,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -720,101 +878,102 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type U_char = X__u_char /* types.h:33:18 */
-type U_short = X__u_short /* types.h:34:19 */
-type U_int = X__u_int /* types.h:35:17 */
-type U_long = X__u_long /* types.h:36:18 */
-type Quad_t = X__quad_t /* types.h:37:18 */
-type U_quad_t = X__u_quad_t /* types.h:38:20 */
-type Fsid_t = X__fsid_t /* types.h:39:18 */
-type Loff_t = X__loff_t /* types.h:42:18 */
+type U_char = uint8 /* types.h:33:18 */
+type U_short = uint16 /* types.h:34:19 */
+type U_int = uint32 /* types.h:35:17 */
+type U_long = uint64 /* types.h:36:18 */
+type Quad_t = int64 /* types.h:37:18 */
+type U_quad_t = uint64 /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = int64 /* types.h:42:18 */
-type Ino_t = X__ino64_t /* types.h:49:19 */
+type Ino_t = uint64 /* types.h:49:19 */
-type Dev_t = X__dev_t /* types.h:59:17 */
+type Dev_t = uint64 /* types.h:59:17 */
-type Gid_t = X__gid_t /* types.h:64:17 */
+type Gid_t = uint32 /* types.h:64:17 */
-type Mode_t = X__mode_t /* types.h:69:18 */
+type Mode_t = uint32 /* types.h:69:18 */
-type Nlink_t = X__nlink_t /* types.h:74:19 */
+type Nlink_t = uint32 /* types.h:74:19 */
-type Uid_t = X__uid_t /* types.h:79:17 */
+type Uid_t = uint32 /* types.h:79:17 */
-type Off_t = X__off64_t /* types.h:87:19 */
+type Off_t = int64 /* types.h:87:19 */
-type Pid_t = X__pid_t /* types.h:97:17 */
+type Pid_t = int32 /* types.h:97:17 */
-type Id_t = X__id_t /* types.h:103:16 */
+type Id_t = uint32 /* types.h:103:16 */
-type Ssize_t = X__ssize_t /* types.h:108:19 */
+type Ssize_t = int64 /* types.h:108:19 */
-type Daddr_t = X__daddr_t /* types.h:114:19 */
-type Caddr_t = X__caddr_t /* types.h:115:19 */
+type Daddr_t = int32 /* types.h:114:19 */
+type Caddr_t = uintptr /* types.h:115:19 */
-type Key_t = X__key_t /* types.h:121:17 */
+type Key_t = int32 /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -834,10 +993,10 @@ type Key_t = X__key_t /* types.h:121:17 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -857,10 +1016,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -880,10 +1039,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -903,7 +1062,7 @@ type Time_t = X__time_t /* time_t.h:7:18 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -923,7 +1082,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -941,7 +1100,7 @@ type Uint = uint32 /* types.h:150:22 */
// <https://www.gnu.org/licenses/>.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -960,22 +1119,22 @@ type Uint = uint32 /* types.h:150:22 */
// Never include this file directly; use <sys/types.h> instead.
-type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
-type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
-type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
-type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+type Int8_t = int8 /* stdint-intn.h:24:18 */
+type Int16_t = int16 /* stdint-intn.h:25:19 */
+type Int32_t = int32 /* stdint-intn.h:26:19 */
+type Int64_t = int64 /* stdint-intn.h:27:19 */
// These were defined by ISO C without the first `_'.
-type U_int8_t = X__uint8_t /* types.h:158:19 */
-type U_int16_t = X__uint16_t /* types.h:159:20 */
-type U_int32_t = X__uint32_t /* types.h:160:20 */
-type U_int64_t = X__uint64_t /* types.h:161:20 */
+type U_int8_t = uint8 /* types.h:158:19 */
+type U_int16_t = uint16 /* types.h:159:20 */
+type U_int32_t = uint32 /* types.h:160:20 */
+type U_int64_t = uint64 /* types.h:161:20 */
type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -994,7 +1153,7 @@ type Register_t = int32 /* types.h:164:13 */
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1013,7 +1172,7 @@ type Register_t = int32 /* types.h:164:13 */
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1033,7 +1192,7 @@ type Register_t = int32 /* types.h:164:13 */
// Never include this file directly; use <sys/types.h> instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1050,9 +1209,8 @@ type Register_t = int32 /* types.h:164:13 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// We don't use `memset' because this would require a prototype and
+// the array isn't too big.
// Get sigset_t.
@@ -1064,7 +1222,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1087,14 +1245,14 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// microsecond but also has a range of years.
type Timeval = struct {
- Ftv_sec X__time_t
- Ftv_usec X__suseconds_t
+ Ftv_sec int64
+ Ftv_usec int64
} /* struct_timeval.h:8:1 */
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1114,7 +1272,7 @@ type Timeval = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1135,11 +1293,11 @@ type Timeval = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
-type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+type Suseconds_t = int64 /* select.h:43:23 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -1148,25 +1306,25 @@ type X__fd_mask = int64 /* select.h:49:18 */
// It's easier to assume 8-bit bytes than to get CHAR_BIT.
// fd_set for select and pselect.
-type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+type Fd_set = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */
// Maximum number of file descriptors in `fd_set'.
// Sometimes the fd_set member is assumed to have this type.
-type Fd_mask = X__fd_mask /* select.h:77:19 */
+type Fd_mask = int64 /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:185:21 */
+type Blksize_t = int32 /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+type Blkcnt_t = int64 /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = uint64 /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = uint64 /* types.h:213:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1185,7 +1343,7 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1224,7 +1382,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+//
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1239,24 +1399,9 @@ type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file sys
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
-
-// Common definition of pthread_mutex_t.
-
-type X__pthread_internal_list = struct {
- F__prev uintptr
- F__next uintptr
-} /* thread-shared-types.h:49:9 */
-
-// Type to count file system inodes.
+// <http://www.gnu.org/licenses/>.
-// Now add the thread types.
-// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1273,9 +1418,8 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For internal mutex and condition variable definitions.
-// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Monotonically increasing wide counters (at least 62 bits).
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1292,56 +1436,26 @@ type X__pthread_internal_list = struct {
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Arch-specific definitions. Each architecture must define the following
-// macros to define the expected sizes of pthread data types:
-//
-// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
-// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
-// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
-// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
-// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
-// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
-// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
-// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
-// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
-//
-// The additional macro defines any constraint for the lock alignment
-// inside the thread structures:
+// Counter that is monotonically increasing (by less than 2**31 per
//
-// __LOCK_ALIGNMENT - for internal lock/futex usage.
-//
-// Same idea but for the once locking primitive:
-//
-// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+// increment), with a single writer, and an arbitrary number of
+// readers.
+type X__atomic_wide_counter = struct{ F__value64 uint64 } /* atomic_wide_counter.h:33:3 */
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// <https://www.gnu.org/licenses/>.
-
-// Determine the wordsize from the preprocessor defines.
+// Common definition of pthread_mutex_t.
-// Both x86-64 and x32 use the 64-bit system call interface.
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:51:9 */
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:55:3 */
-type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:57:9 */
-type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:60:3 */
// Arch-specific mutex definitions. A generic implementation is provided
// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
@@ -1357,8 +1471,8 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
// It should initialize the mutex internal flag.
-// x86 internal mutex struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default mutex implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1375,16 +1489,20 @@ type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX and C11 mutexes. New ports are expected
+// to use the default layout, however architecture can redefine it to
+// add arch-specific extension (such as lock-elision). The struct have
+// a size of 32 bytes on LP32 and 40 bytes on LP64 architectures.
+
type X__pthread_mutex_s = struct {
- F__lock int32
- F__count uint32
- F__owner int32
- F__nusers uint32
- F__kind int32
- F__spins int16
- F__elision int16
- F__list X__pthread_list_t
-} /* struct_mutex.h:22:1 */
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int32
+ F__list X__pthread_list_t
+} /* struct_mutex.h:27:1 */
// Arch-sepecific read-write lock definitions. A generic implementation is
// provided by struct_rwlock.h. If required, an architecture can override it
@@ -1397,9 +1515,26 @@ type X__pthread_mutex_s = struct {
// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
// It should initialize the rwlock internal type.
-// x86 internal rwlock struct definitions.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Default read-write lock implementation struct definitions.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1416,6 +1551,11 @@ type X__pthread_mutex_s = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
+// Generic struct for both POSIX read-write lock. New ports are expected
+// to use the default layout, however archictetures can redefine it to add
+// arch-specific extensions (such as lock-elision). The struct have a size
+// of 32 bytes on both LP32 and LP64 architectures.
+
type X__pthread_rwlock_arch_t = struct {
F__readers uint32
F__writers uint32
@@ -1423,26 +1563,29 @@ type X__pthread_rwlock_arch_t = struct {
F__writers_futex uint32
F__pad3 uint32
F__pad4 uint32
+ F__flags uint8
+ F__shared uint8
+ F__pad1 uint8
+ F__pad2 uint8
F__cur_writer int32
- F__shared int32
- F__rwelision int8
- F__pad1 [7]uint8
- F__pad2 uint64
- F__flags uint32
- F__ccgo_pad1 [4]byte
-} /* struct_rwlock.h:23:1 */
+} /* struct_rwlock.h:29:1 */
// Common definition of pthread_cond_t.
type X__pthread_cond_s = struct {
- F__0 struct{ F__wseq uint64 }
- F__8 struct{ F__g1_start uint64 }
+ F__wseq X__atomic_wide_counter
+ F__g1_start X__atomic_wide_counter
F__g_refs [2]uint32
F__g_size [2]uint32
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:92:1 */
+} /* thread-shared-types.h:94:1 */
+
+type X__tss_t = uint32 /* thread-shared-types.h:105:22 */
+type X__thrd_t = uint64 /* thread-shared-types.h:106:27 */
+
+type X__once_flag = struct{ F__data int32 } /* thread-shared-types.h:111:3 */
// Thread identifiers. The structure of the attribute type is not
//
@@ -1485,7 +1628,11 @@ 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.
-type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+type Pthread_rwlock_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__data X__pthread_rwlock_arch_t
+ F__ccgo_pad2 [24]byte
+} /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
F__ccgo_pad1 [0]uint64
diff --git a/vendor/modernc.org/libc/sys/types/types_linux_mips64le.go b/vendor/modernc.org/libc/sys/types/types_linux_mips64le.go
new file mode 100644
index 000000000..8a758d4cd
--- /dev/null
+++ b/vendor/modernc.org/libc/sys/types/types_linux_mips64le.go
@@ -0,0 +1,1511 @@
+// 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_linux_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:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/termios/capi_illumos_amd64.go b/vendor/modernc.org/libc/termios/capi_illumos_amd64.go
new file mode 100644
index 000000000..b92257591
--- /dev/null
+++ b/vendor/modernc.org/libc/termios/capi_illumos_amd64.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_illumos_amd64.go -pkgname termios', DO NOT EDIT.
+
+package termios
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/termios/capi_linux_loong64.go b/vendor/modernc.org/libc/termios/capi_linux_loong64.go
index 193dc60e8..b240607f5 100644
--- a/vendor/modernc.org/libc/termios/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/termios/capi_linux_loong64.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 -ignore-unsupported-alignment -o termios/termios_linux_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_linux_loong64.go -pkgname termios', DO NOT EDIT.
package termios
diff --git a/vendor/modernc.org/libc/termios/capi_linux_mips64le.go b/vendor/modernc.org/libc/termios/capi_linux_mips64le.go
new file mode 100644
index 000000000..193dc60e8
--- /dev/null
+++ b/vendor/modernc.org/libc/termios/capi_linux_mips64le.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_linux_amd64.go -pkgname termios', DO NOT EDIT.
+
+package termios
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/termios/termios_illumos_amd64.go b/vendor/modernc.org/libc/termios/termios_illumos_amd64.go
new file mode 100644
index 000000000..6af3344d0
--- /dev/null
+++ b/vendor/modernc.org/libc/termios/termios_illumos_amd64.go
@@ -0,0 +1,2689 @@
+// 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_illumos_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 (
+ B0 = 0 // termios.h:543:1:
+ B1000000 = 24 // termios.h:567:1:
+ B110 = 3 // termios.h:546:1:
+ B115200 = 18 // termios.h:561:1:
+ B1152000 = 25 // termios.h:568:1:
+ B1200 = 9 // termios.h:552:1:
+ B134 = 4 // termios.h:547:1:
+ B150 = 5 // termios.h:548:1:
+ B1500000 = 26 // termios.h:569:1:
+ B153600 = 19 // termios.h:562:1:
+ B1800 = 10 // termios.h:553:1:
+ B19200 = 14 // termios.h:557:1:
+ B200 = 6 // termios.h:549:1:
+ B2000000 = 27 // termios.h:570:1:
+ B230400 = 20 // termios.h:563:1:
+ B2400 = 11 // termios.h:554:1:
+ B2500000 = 28 // termios.h:571:1:
+ B300 = 7 // termios.h:550:1:
+ B3000000 = 29 // termios.h:572:1:
+ B307200 = 21 // termios.h:564:1:
+ B3500000 = 30 // termios.h:573:1:
+ B38400 = 15 // termios.h:558:1:
+ B4000000 = 31 // termios.h:574:1:
+ B460800 = 22 // termios.h:565:1:
+ B4800 = 12 // termios.h:555:1:
+ B50 = 1 // termios.h:544:1:
+ B57600 = 16 // termios.h:559:1:
+ B600 = 8 // termios.h:551:1:
+ B75 = 2 // termios.h:545:1:
+ B76800 = 17 // termios.h:560:1:
+ B921600 = 23 // termios.h:566:1:
+ B9600 = 13 // termios.h:556:1:
+ BRKINT = 0000002 // termios.h:187:1:
+ BS0 = 0 // termios.h:244:1:
+ BS1 = 0020000 // termios.h:245:1:
+ BSDLY = 0020000 // termios.h:243:1:
+ CBAUD = 0000017 // termios.h:258:1:
+ CBAUDEXT = 010000000 // termios.h:280:1:
+ CCTS_OFLOW = 020000000000 // termios.h:287:1:
+ CDEL = 0177 // termios.h:157:1:
+ CDSUSP = 25 // termios.h:176:1:
+ CEOF = 04 // termios.h:170:1:
+ CEOL = 0 // termios.h:168:1:
+ CEOL2 = 0 // termios.h:169:1:
+ CEOT = 04 // termios.h:167:1:
+ CERASE = 0177 // termios.h:164:1:
+ CERASE2 = 8 // termios.h:165:1:
+ CESC = 92 // termios.h:161:1:
+ CFLUSH = 15 // termios.h:178:1:
+ CIBAUD = 03600000 // termios.h:278:1:
+ CIBAUDEXT = 020000000 // termios.h:281:1:
+ CINTR = 3 // termios.h:162:1:
+ CKILL = 21 // termios.h:166:1:
+ CLNEXT = 22 // termios.h:180:1:
+ CLOCAL = 0004000 // termios.h:270:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ CNSWTCH = 0 // termios.h:174:1:
+ CNUL = 0 // termios.h:156:1:
+ CQUIT = 034 // termios.h:163:1:
+ CR0 = 0 // termios.h:228:1:
+ CR1 = 0001000 // termios.h:229:1:
+ CR2 = 0002000 // termios.h:230:1:
+ CR3 = 0003000 // termios.h:231:1:
+ CRDLY = 0003000 // termios.h:227:1:
+ CREAD = 0000200 // termios.h:266:1:
+ CRPRNT = 18 // termios.h:177:1:
+ CRTSCTS = 020000000000 // termios.h:277:1:
+ CRTSXOFF = 010000000000 // termios.h:276:1:
+ CRTS_IFLOW = 010000000000 // termios.h:286:1:
+ CS5 = 0 // termios.h:261:1:
+ CS6 = 0000020 // termios.h:262:1:
+ CS7 = 0000040 // termios.h:263:1:
+ CS8 = 0000060 // termios.h:264:1:
+ CSIZE = 0000060 // termios.h:260:1:
+ CSTART = 021 // termios.h:171:1:
+ CSTATUS = 20 // termios.h:181:1:
+ CSTOP = 023 // termios.h:172:1:
+ CSTOPB = 0000100 // termios.h:265:1:
+ CSUSP = 26 // termios.h:175:1:
+ CSWTCH = 032 // termios.h:173:1:
+ CWERASE = 23 // termios.h:179:1:
+ DEFECHO = 0010000 // termios.h:309:1:
+ DIOC = 25600 // termios.h:524:1:
+ DIOCGETP = 25608 // termios.h:525:1:
+ DIOCSETP = 25609 // termios.h:526:1:
+ DOSMODE = 0100000 // termios.h:208:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ ECHO = 0000010 // termios.h:299:1:
+ ECHOCTL = 0001000 // termios.h:306:1:
+ ECHOE = 0000020 // termios.h:300:1:
+ ECHOK = 0000040 // termios.h:301:1:
+ ECHOKE = 0004000 // termios.h:308:1:
+ ECHONL = 0000100 // termios.h:302:1:
+ ECHOPRT = 0002000 // termios.h:307:1:
+ EXTA = 14 // ttydev.h:56:1:
+ EXTB = 15 // ttydev.h:57:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ FF0 = 0 // termios.h:250:1:
+ FF1 = 0100000 // termios.h:251:1:
+ FFDLY = 0100000 // termios.h:249:1:
+ FIORDCHK = 26115 // termios.h:537:1:
+ FLUSHO = 0020000 // termios.h:310:1:
+ HUPCL = 0002000 // termios.h:269:1:
+ IBSHIFT = 16 // termios.h:65:1:
+ ICANON = 0000002 // termios.h:293:1:
+ ICRNL = 0000400 // termios.h:194:1:
+ IEXTEN = 0100000 // termios.h:314:1:
+ IGNBRK = 0000001 // termios.h:186:1:
+ IGNCR = 0000200 // termios.h:193:1:
+ IGNPAR = 0000004 // termios.h:188:1:
+ IMAXBEL = 0020000 // termios.h:207:1:
+ INLCR = 0000100 // termios.h:192:1:
+ INPCK = 0000020 // termios.h:190:1:
+ IOCTYPE = 0xff00 // termios.h:336:1:
+ ISIG = 0000001 // termios.h:292:1:
+ ISTRIP = 0000040 // termios.h:191:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ IUCLC = 0001000 // termios.h:198:1:
+ IXANY = 0004000 // termios.h:203:1:
+ IXOFF = 0010000 // termios.h:205:1:
+ IXON = 0002000 // termios.h:200:1:
+ KBENABLED = 21514 // termios.h:333:1:
+ LDCHG = 17410 // termios.h:508:1:
+ LDCLOSE = 17409 // termios.h:507:1:
+ LDDMAP = 17522 // termios.h:518:1:
+ LDEMAP = 17521 // termios.h:517:1:
+ LDGETT = 17416 // termios.h:509:1:
+ LDGMAP = 17519 // termios.h:515:1:
+ LDIOC = 17408 // termios.h:504:1:
+ LDNMAP = 17520 // termios.h:516:1:
+ LDOPEN = 17408 // termios.h:506:1:
+ LDSETT = 17417 // termios.h:510:1:
+ LDSMAP = 17518 // termios.h:514:1:
+ LOBLK = 0040000 // termios.h:274:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ NCC = 8 // termios.h:71:1:
+ NCCS = 19 // termios.h:75:1:
+ NL0 = 0 // termios.h:225:1:
+ NL1 = 0000400 // termios.h:226:1:
+ NLDLY = 0000400 // termios.h:224:1:
+ NOFLSH = 0000200 // termios.h:303:1:
+ OCRNL = 0000010 // termios.h:219:1:
+ OFDEL = 0000200 // termios.h:223:1:
+ OFILL = 0000100 // termios.h:222:1:
+ OLCUC = 0000002 // termios.h:216:1:
+ ONLCR = 0000004 // termios.h:218:1:
+ ONLRET = 0000040 // termios.h:221:1:
+ ONOCR = 0000020 // termios.h:220:1:
+ OPOST = 0000001 // termios.h:212:1:
+ PAGEOUT = 0200000 // termios.h:254:1:
+ PARENB = 0000400 // termios.h:267:1:
+ PAREXT = 04000000 // termios.h:279:1:
+ PARMRK = 0000010 // termios.h:189:1:
+ PARODD = 0001000 // termios.h:268:1:
+ PENDIN = 0040000 // termios.h:311:1:
+ P_MYID = -1 // types.h:632:1:
+ RCV1EN = 0010000 // termios.h:272:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ RTS_TOG = 21537 // termios.h:340:1:
+ SEC = 1 // time.h:244:1:
+ TAB0 = 0 // termios.h:233:1:
+ TAB1 = 0004000 // termios.h:234:1:
+ TAB2 = 0010000 // termios.h:235:1:
+ TAB3 = 0014000 // termios.h:236:1:
+ TABDLY = 0014000 // termios.h:232:1:
+ TCDSET = 21536 // termios.h:339:1:
+ TCFLSH = 21511 // termios.h:327:1:
+ TCGETA = 21505 // termios.h:321:1:
+ TCGETS = 21517 // termios.h:354:1:
+ TCIFLUSH = 0 // termios.h:409:1:
+ TCIOFF = 2 // termios.h:415:1:
+ TCIOFLUSH = 2 // termios.h:411:1:
+ TCION = 3 // termios.h:416:1:
+ TCOFLUSH = 1 // termios.h:410:1:
+ TCOOFF = 0 // termios.h:413:1:
+ TCOON = 1 // termios.h:414:1:
+ TCSADRAIN = 21519 // termios.h:361:1:
+ TCSAFLUSH = 21520 // termios.h:405:1:
+ TCSANOW = 21518 // termios.h:357:1:
+ TCSBRK = 21509 // termios.h:325:1:
+ TCSETA = 21506 // termios.h:322:1:
+ TCSETAF = 21508 // termios.h:324:1:
+ TCSETAW = 21507 // termios.h:323:1:
+ TCSETS = 21518 // termios.h:355:1:
+ TCSETSF = 21520 // termios.h:363:1:
+ TCSETSW = 21519 // termios.h:359:1:
+ TCXONC = 21510 // termios.h:326:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ TIOC = 21504 // termios.h:319:1:
+ TIOCCBRK = 29818 // termios.h:452:1:
+ TIOCCDTR = 29816 // termios.h:454:1:
+ TIOCCILOOP = 29804 // termios.h:463:1:
+ TIOCEXCL = 29709 // termios.h:436:1:
+ TIOCFLUSH = 29712 // termios.h:438:1:
+ TIOCGETC = 29714 // termios.h:440:1:
+ TIOCGETD = 29696 // termios.h:430:1:
+ TIOCGETLD = 21628 // termios.h:369:1:
+ TIOCGETP = 29704 // termios.h:433:1:
+ TIOCGLTC = 29812 // termios.h:456:1:
+ TIOCGPGRP = 29716 // termios.h:472:1:
+ TIOCGPPS = 21629 // termios.h:386:1:
+ TIOCGPPSEV = 21631 // termios.h:388:1:
+ TIOCGSID = 29718 // termios.h:474:1:
+ TIOCGSOFTCAR = 21609 // termios.h:348:1:
+ TIOCGWINSZ = 21608 // termios.h:342:1:
+ TIOCHPCL = 29698 // termios.h:432:1:
+ TIOCKBOF = 21513 // termios.h:332:1:
+ TIOCKBON = 21512 // termios.h:331:1:
+ TIOCLBIC = 29822 // termios.h:448:1:
+ TIOCLBIS = 29823 // termios.h:447:1:
+ TIOCLGET = 29820 // termios.h:450:1:
+ TIOCLSET = 29821 // termios.h:449:1:
+ TIOCMBIC = 29724 // termios.h:482:1:
+ TIOCMBIS = 29723 // termios.h:481:1:
+ TIOCMGET = 29725 // termios.h:483:1:
+ TIOCMSET = 29722 // termios.h:480:1:
+ TIOCM_CAR = 0100 // termios.h:490:1:
+ TIOCM_CD = 64 // termios.h:491:1:
+ TIOCM_CTS = 0040 // termios.h:489:1:
+ TIOCM_DSR = 0400 // termios.h:494:1:
+ TIOCM_DTR = 0002 // termios.h:485:1:
+ TIOCM_LE = 0001 // termios.h:484:1:
+ TIOCM_RI = 128 // termios.h:493:1:
+ TIOCM_RNG = 0200 // termios.h:492:1:
+ TIOCM_RTS = 0004 // termios.h:486:1:
+ TIOCM_SR = 0020 // termios.h:488:1:
+ TIOCM_ST = 0010 // termios.h:487:1:
+ TIOCNOTTY = 29809 // termios.h:458:1:
+ TIOCNXCL = 29710 // termios.h:437:1:
+ TIOCOUTQ = 29811 // termios.h:457:1:
+ TIOCREMOTE = 29726 // termios.h:498:1:
+ TIOCSBRK = 29819 // termios.h:451:1:
+ TIOCSCTTY = 29828 // termios.h:459:1:
+ TIOCSDTR = 29817 // termios.h:453:1:
+ TIOCSETC = 29713 // termios.h:439:1:
+ TIOCSETD = 29697 // termios.h:431:1:
+ TIOCSETLD = 21627 // termios.h:368:1:
+ TIOCSETN = 29706 // termios.h:435:1:
+ TIOCSETP = 29705 // termios.h:434:1:
+ TIOCSIGNAL = 29727 // termios.h:499:1:
+ TIOCSILOOP = 29805 // termios.h:462:1:
+ TIOCSLTC = 29813 // termios.h:455:1:
+ TIOCSPGRP = 29717 // termios.h:473:1:
+ TIOCSPPS = 21630 // termios.h:387:1:
+ TIOCSSOFTCAR = 21610 // termios.h:349:1:
+ TIOCSTART = 29806 // termios.h:461:1:
+ TIOCSTI = 29719 // termios.h:477:1:
+ TIOCSTOP = 29807 // termios.h:460:1:
+ TIOCSWINSZ = 21607 // termios.h:343:1:
+ TOSTOP = 0000400 // termios.h:304:1:
+ VCEOF = 8 // termios.h:153:1:
+ VCEOL = 9 // termios.h:154:1:
+ VDISCARD = 13 // termios.h:143:1:
+ VDSUSP = 11 // termios.h:141:1:
+ VEOF = 4 // termios.h:127:1:
+ VEOL = 5 // termios.h:128:1:
+ VEOL2 = 6 // termios.h:130:1:
+ VERASE = 2 // termios.h:125:1:
+ VERASE2 = 17 // termios.h:147:1:
+ VINTR = 0 // termios.h:123:1:
+ VKILL = 3 // termios.h:126:1:
+ VLNEXT = 15 // termios.h:145:1:
+ VMIN = 4 // termios.h:132:1:
+ VQUIT = 1 // termios.h:124:1:
+ VREPRINT = 12 // termios.h:142:1:
+ VSTART = 8 // termios.h:137:1:
+ VSTATUS = 16 // termios.h:146:1:
+ VSTOP = 9 // termios.h:138:1:
+ VSUSP = 10 // termios.h:139:1:
+ VSWTCH = 7 // termios.h:135:1:
+ VT0 = 0 // termios.h:247:1:
+ VT1 = 0040000 // termios.h:248:1:
+ VTDLY = 0040000 // termios.h:246:1:
+ VTIME = 5 // termios.h:133:1:
+ VWERASE = 14 // termios.h:144:1:
+ WRAP = 0400000 // termios.h:255:1:
+ XCASE = 0000004 // termios.h:297:1:
+ XCLUDE = 0100000 // termios.h:275:1:
+ XMT1EN = 0020000 // termios.h:273:1:
+ XTABS = 0014000 // termios.h:239:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NCC = 8 // termios.h:69:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX_VDISABLE = 0 // termios.h:59:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // time.h:50:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TERMIOS_H = 0 // termios.h:32:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TTYDEV_H = 0 // ttydev.h:27:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TERMIOS_H = 0 // termios.h:27:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // time.h:45:1:
+ X_TIOC = 21504 // termios.h:315:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ TIOC1 = 29696 // termios.h:421:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Terminal definitions related to underlying hardware.
+
+// Speeds
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Time_t = int64 /* time.h:46:14 */ // time of day in seconds
+
+type Suseconds_t = int64 /* time.h:51:14 */ // signed # of microseconds
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// _POSIX_VDISABLE has been defined in <sys/termios.h> since the
+// introduction of the header. The POSIX standard, IEEE Std.
+// 1003.1-1988 also required the existence of _POSIX_VDISABLE in
+// this header. Subsequent versions of the IEEE Standard as well
+// as the X/Open specifications required that _POSIX_VDISABLE be
+// defined in <unistd.h> while still allowing for it's existence
+// here. With the introduction of XPG6, _POSIX_VDISABLE can only
+// be defined in <unistd.h>.
+
+// required by termio.h and VCEOF/VCEOL
+
+// some defines required by POSIX
+
+// types defined by POSIX. These are better off in types.h, but
+// the standard says that they have to be in termios.h.
+type Tcflag_t = uint32 /* termios.h:81:22 */
+type Cc_t = uint8 /* termios.h:82:23 */
+type Speed_t = uint32 /* termios.h:83:22 */
+
+// Ioctl control packet
+type Termios = struct {
+ Fc_iflag uint32
+ Fc_oflag uint32
+ Fc_cflag uint32
+ Fc_lflag uint32
+ Fc_cc [19]uint8
+ F__ccgo_pad1 [1]byte
+} /* termios.h:88:1 */
+
+// control characters
+// 18 through 19 reserved for future use
+
+// control characters form Xenix termio.h
+
+// S5 default control chars
+// CINTR, CERASE and CKILL modified to SunOS traditional values
+
+// input modes
+
+// output modes
+
+// control modes
+
+// 4.4BSD hardware flow control flags
+
+// line discipline 0 modes
+
+// Slots reserved for 386/XENIX compatibility - keyboard control
+
+// Softcarrier ioctls
+
+// termios ioctls
+
+// linux terminal ioctls we need to be aware of
+
+// The VMIN and VTIME and solaris overlap with VEOF and VEOL - This is
+// perfectly legal except, linux expects them to be separate. So we keep
+// them separately.
+type Lx_cc = struct {
+ Fveof uint8
+ Fveol uint8
+ Fvmin uint8
+ Fvtime uint8
+} /* termios.h:376:1 */
+
+// NTP PPS ioctls
+
+// Argument filled in by TIOCGPPSEV
+type Ppsclockev = struct {
+ Ftv struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fserial uint32
+ F__ccgo_pad1 [4]byte
+} /* termios.h:391:1 */
+
+// termios option flags
+
+// TIOC ioctls for BSD, ptys, job control and modem control
+
+// Slots for 386/XENIX compatibility
+// BSD includes these ioctls in ttold.h
+
+// BSD ioctls that are not the same as XENIX are included here.
+// There are also some relevant ioctls from SUN/BSD sys/ttycom.h
+// BSD pty ioctls like TIOCPKT are not supported in SVR4.
+
+// POSIX job control ioctls
+
+// Miscellaneous
+
+// Modem control
+
+// pseudo-tty
+
+// Some more 386 xenix stuff
+
+// Slots for 386 compatibility
+
+// These are retained for 386/XENIX compatibility.
+
+// Returns a non-zero value if there
+// are characters in the input queue.
+//
+// XXX - somebody is confused here. V7 had no such "ioctl", although XENIX may
+// have added it; 4BSD had FIONREAD, which returned the number of characters
+// waiting, and was supposed to work on all descriptors (i.e., every driver
+// should make a stab at implementing it).
+
+// Speeds
+
+// Windowing structure to support JWINSIZE/TIOCSWINSZ/TIOCGWINSZ
+type Winsize = struct {
+ Fws_row uint16
+ Fws_col uint16
+ Fws_xpixel uint16
+ Fws_ypixel uint16
+} /* termios.h:580:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/termios/termios_linux_loong64.go b/vendor/modernc.org/libc/termios/termios_linux_loong64.go
index 494b20174..da9f24556 100644
--- a/vendor/modernc.org/libc/termios/termios_linux_loong64.go
+++ b/vendor/modernc.org/libc/termios/termios_linux_loong64.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 -ignore-unsupported-alignment -o termios/termios_linux_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_linux_loong64.go -pkgname termios', DO NOT EDIT.
package termios
@@ -15,190 +15,202 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- B0 = 0000000 // termios.h:33:1:
- B1000000 = 0010010 // termios-baud.h:40:1:
- B110 = 0000003 // termios.h:36:1:
- B115200 = 0010002 // termios-baud.h:34:1:
- B1152000 = 0010011 // termios-baud.h:41:1:
- B1200 = 0000011 // termios.h:42:1:
- B134 = 0000004 // termios.h:37:1:
- B150 = 0000005 // termios.h:38:1:
- B1500000 = 0010012 // termios-baud.h:42:1:
- B1800 = 0000012 // termios.h:43:1:
- B19200 = 0000016 // termios.h:47:1:
- B200 = 0000006 // termios.h:39:1:
- B2000000 = 0010013 // termios-baud.h:43:1:
- B230400 = 0010003 // termios-baud.h:35:1:
- B2400 = 0000013 // termios.h:44:1:
- B2500000 = 0010014 // termios-baud.h:44:1:
- B300 = 0000007 // termios.h:40:1:
- B3000000 = 0010015 // termios-baud.h:45:1:
- B3500000 = 0010016 // termios-baud.h:46:1:
- B38400 = 0000017 // termios.h:48:1:
- B4000000 = 0010017 // termios-baud.h:47:1:
- B460800 = 0010004 // termios-baud.h:36:1:
- B4800 = 0000014 // termios.h:45:1:
- B50 = 0000001 // termios.h:34:1:
- B500000 = 0010005 // termios-baud.h:37:1:
- B57600 = 0010001 // termios-baud.h:33:1:
- B576000 = 0010006 // termios-baud.h:38:1:
- B600 = 0000010 // termios.h:41:1:
- B75 = 0000002 // termios.h:35:1:
- B921600 = 0010007 // termios-baud.h:39:1:
- B9600 = 0000015 // termios.h:46:1:
- BRKINT = 0000002 // termios-c_iflag.h:25:1:
- BS0 = 0000000 // termios-c_oflag.h:48:1:
- BS1 = 0020000 // termios-c_oflag.h:49:1:
- BSDLY = 0020000 // termios-c_oflag.h:47:1:
- CBAUD = 000000010017 // termios-baud.h:24:1:
- CBAUDEX = 000000010000 // termios-baud.h:25:1:
- CBRK = 0 // ttydefaults.h:83:1:
- CDISCARD = 15 // ttydefaults.h:78:1:
- CDSUSP = 25 // ttydefaults.h:74:1:
- CEOF = 4 // ttydefaults.h:56:1:
- CEOL = 0 // ttydefaults.h:60:1:
- CEOT = 4 // ttydefaults.h:81:1:
- CERASE = 0177 // ttydefaults.h:62:1:
- CFLUSH = 15 // ttydefaults.h:85:1:
- CIBAUD = 002003600000 // termios-baud.h:27:1:
- CINTR = 3 // ttydefaults.h:63:1:
- CKILL = 21 // ttydefaults.h:69:1:
- CLNEXT = 22 // ttydefaults.h:77:1:
- CLOCAL = 0004000 // termios-c_cflag.h:34:1:
- CMIN = 1 // ttydefaults.h:70:1:
- CMSPAR = 010000000000 // termios-baud.h:28:1:
- CQUIT = 034 // ttydefaults.h:71:1:
- CR0 = 0000000 // termios-c_oflag.h:38:1:
- CR1 = 0001000 // termios-c_oflag.h:39:1:
- CR2 = 0002000 // termios-c_oflag.h:40:1:
- CR3 = 0003000 // termios-c_oflag.h:41:1:
- CRDLY = 0003000 // termios-c_oflag.h:37:1:
- CREAD = 0000200 // termios-c_cflag.h:30:1:
- CREPRINT = 18 // ttydefaults.h:80:1:
- CRPRNT = 18 // ttydefaults.h:84:1:
- CRTSCTS = 020000000000 // termios-baud.h:29:1:
- CS5 = 0000000 // termios-c_cflag.h:25:1:
- CS6 = 0000020 // termios-c_cflag.h:26:1:
- CS7 = 0000040 // termios-c_cflag.h:27:1:
- CS8 = 0000060 // termios-c_cflag.h:28:1:
- CSIZE = 0000060 // termios-c_cflag.h:24:1:
- CSTART = 17 // ttydefaults.h:75:1:
- CSTATUS = 0 // ttydefaults.h:67:1:
- CSTOP = 19 // ttydefaults.h:76:1:
- CSTOPB = 0000100 // termios-c_cflag.h:29:1:
- CSUSP = 26 // ttydefaults.h:72:1:
- CTIME = 0 // ttydefaults.h:73:1:
- CWERASE = 23 // ttydefaults.h:79:1:
- ECHO = 0000010 // termios-c_lflag.h:29:1:
- ECHOCTL = 0001000 // termios-c_lflag.h:37:1:
- ECHOE = 0000020 // termios-c_lflag.h:30:1:
- ECHOK = 0000040 // termios-c_lflag.h:32:1:
- ECHOKE = 0004000 // termios-c_lflag.h:45:1:
- ECHONL = 0000100 // termios-c_lflag.h:33:1:
- ECHOPRT = 0002000 // termios-c_lflag.h:42:1:
- EXTA = 14 // termios.h:50:1:
- EXTB = 15 // termios.h:51:1:
- EXTPROC = 0200000 // termios-c_lflag.h:57:1:
- FF0 = 0000000 // termios-c_oflag.h:51:1:
- FF1 = 0100000 // termios-c_oflag.h:52:1:
- FFDLY = 0100000 // termios-c_oflag.h:50:1:
- FLUSHO = 0010000 // termios-c_lflag.h:48:1:
- HUPCL = 0002000 // termios-c_cflag.h:33:1:
- ICANON = 0000002 // termios-c_lflag.h:25:1:
- ICRNL = 0000400 // termios-c_iflag.h:32:1:
- IEXTEN = 0100000 // termios-c_lflag.h:54:1:
- IGNBRK = 0000001 // termios-c_iflag.h:24:1:
- IGNCR = 0000200 // termios-c_iflag.h:31:1:
- IGNPAR = 0000004 // termios-c_iflag.h:26:1:
- IMAXBEL = 0020000 // termios-c_iflag.h:38:1:
- INLCR = 0000100 // termios-c_iflag.h:30:1:
- INPCK = 0000020 // termios-c_iflag.h:28:1:
- ISIG = 0000001 // termios-c_lflag.h:24:1:
- ISTRIP = 0000040 // termios-c_iflag.h:29:1:
- IUCLC = 0001000 // termios-c_iflag.h:33:1:
- IUTF8 = 0040000 // termios-c_iflag.h:40:1:
- IXANY = 0004000 // termios-c_iflag.h:36:1:
- IXOFF = 0010000 // termios-c_iflag.h:37:1:
- IXON = 0002000 // termios-c_iflag.h:35:1:
- NCCS = 32 // termios-struct.h:23:1:
- NL0 = 0000000 // termios-c_oflag.h:35:1:
- NL1 = 0000400 // termios-c_oflag.h:36:1:
- NLDLY = 0000400 // termios-c_oflag.h:34:1:
- NOFLSH = 0000200 // termios-c_lflag.h:34:1:
- OCRNL = 0000010 // termios-c_oflag.h:28:1:
- OFDEL = 0000200 // termios-c_oflag.h:32:1:
- OFILL = 0000100 // termios-c_oflag.h:31:1:
- OLCUC = 0000002 // termios-c_oflag.h:25:1:
- ONLCR = 0000004 // termios-c_oflag.h:27:1:
- ONLRET = 0000040 // termios-c_oflag.h:30:1:
- ONOCR = 0000020 // termios-c_oflag.h:29:1:
- OPOST = 0000001 // termios-c_oflag.h:24:1:
- PARENB = 0000400 // termios-c_cflag.h:31:1:
- PARMRK = 0000010 // termios-c_iflag.h:27:1:
- PARODD = 0001000 // termios-c_cflag.h:32:1:
- PENDIN = 0040000 // termios-c_lflag.h:50:1:
- TAB0 = 0000000 // termios-c_oflag.h:43:1:
- TAB1 = 0004000 // termios-c_oflag.h:44:1:
- TAB2 = 0010000 // termios-c_oflag.h:45:1:
- TAB3 = 0014000 // termios-c_oflag.h:46:1:
- TABDLY = 0014000 // termios-c_oflag.h:42:1:
- TCIFLUSH = 0 // termios.h:70:1:
- TCIOFF = 2 // termios.h:66:1:
- TCIOFLUSH = 2 // termios.h:72:1:
- TCION = 3 // termios.h:67:1:
- TCOFLUSH = 1 // termios.h:71:1:
- TCOOFF = 0 // termios.h:64:1:
- TCOON = 1 // termios.h:65:1:
- TCSADRAIN = 1 // termios-tcflow.h:25:1:
- TCSAFLUSH = 2 // termios-tcflow.h:26:1:
- TCSANOW = 0 // termios-tcflow.h:24:1:
- TIOCSER_TEMT = 0x01 // termios.h:60:1:
- TOSTOP = 0000400 // termios-c_lflag.h:35:1:
- TTYDEF_CFLAG = 1440 // ttydefaults.h:49:1:
- TTYDEF_IFLAG = 11554 // ttydefaults.h:46:1:
- TTYDEF_LFLAG = 35355 // ttydefaults.h:48:1:
- TTYDEF_OFLAG = 6149 // ttydefaults.h:47:1:
- TTYDEF_SPEED = 13 // ttydefaults.h:50:1:
- VDISCARD = 13 // termios-c_cc.h:37:1:
- VEOF = 4 // termios-c_cc.h:28:1:
- VEOL = 11 // termios-c_cc.h:35:1:
- VEOL2 = 16 // termios-c_cc.h:40:1:
- VERASE = 2 // termios-c_cc.h:26:1:
- VINTR = 0 // termios-c_cc.h:24:1:
- VKILL = 3 // termios-c_cc.h:27:1:
- VLNEXT = 15 // termios-c_cc.h:39:1:
- VMIN = 6 // termios-c_cc.h:30:1:
- VQUIT = 1 // termios-c_cc.h:25:1:
- VREPRINT = 12 // termios-c_cc.h:36:1:
- VSTART = 8 // termios-c_cc.h:32:1:
- VSTOP = 9 // termios-c_cc.h:33:1:
- VSUSP = 10 // termios-c_cc.h:34:1:
- VSWTC = 7 // termios-c_cc.h:31:1:
- VT0 = 0000000 // termios-c_oflag.h:56:1:
- VT1 = 0040000 // termios-c_oflag.h:57:1:
- VTDLY = 0040000 // termios-c_oflag.h:55:1:
- VTIME = 5 // termios-c_cc.h:29:1:
- VWERASE = 14 // termios-c_cc.h:38:1:
- XCASE = 0000004 // termios-c_lflag.h:27:1:
- XTABS = 0014000 // termios-c_oflag.h:60:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1 // termios-struct.h:34:1:
- X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1 // termios-struct.h:35:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:41:1:
- X_TERMIOS_H = 1 // termios.h:23:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ ADDRB = 04000000000 // termios-c_cflag.h:37:1:
+ B0 = 0000000 // termios.h:33:1:
+ B1000000 = 0010010 // termios-baud.h:40:1:
+ B110 = 0000003 // termios.h:36:1:
+ B115200 = 0010002 // termios-baud.h:34:1:
+ B1152000 = 0010011 // termios-baud.h:41:1:
+ B1200 = 0000011 // termios.h:42:1:
+ B134 = 0000004 // termios.h:37:1:
+ B150 = 0000005 // termios.h:38:1:
+ B1500000 = 0010012 // termios-baud.h:42:1:
+ B1800 = 0000012 // termios.h:43:1:
+ B19200 = 0000016 // termios.h:47:1:
+ B200 = 0000006 // termios.h:39:1:
+ B2000000 = 0010013 // termios-baud.h:43:1:
+ B230400 = 0010003 // termios-baud.h:35:1:
+ B2400 = 0000013 // termios.h:44:1:
+ B2500000 = 0010014 // termios-baud.h:44:1:
+ B300 = 0000007 // termios.h:40:1:
+ B3000000 = 0010015 // termios-baud.h:45:1:
+ B3500000 = 0010016 // termios-baud.h:46:1:
+ B38400 = 0000017 // termios.h:48:1:
+ B4000000 = 0010017 // termios-baud.h:47:1:
+ B460800 = 0010004 // termios-baud.h:36:1:
+ B4800 = 0000014 // termios.h:45:1:
+ B50 = 0000001 // termios.h:34:1:
+ B500000 = 0010005 // termios-baud.h:37:1:
+ B57600 = 0010001 // termios-baud.h:33:1:
+ B576000 = 0010006 // termios-baud.h:38:1:
+ B600 = 0000010 // termios.h:41:1:
+ B75 = 0000002 // termios.h:35:1:
+ B921600 = 0010007 // termios-baud.h:39:1:
+ B9600 = 0000015 // termios.h:46:1:
+ BRKINT = 0000002 // termios-c_iflag.h:25:1:
+ BS0 = 0000000 // termios-c_oflag.h:48:1:
+ BS1 = 0020000 // termios-c_oflag.h:49:1:
+ BSDLY = 0020000 // termios-c_oflag.h:47:1:
+ CBAUD = 000000010017 // termios-baud.h:24:1:
+ CBAUDEX = 000000010000 // termios-baud.h:25:1:
+ CBRK = 0 // ttydefaults.h:83:1:
+ CDISCARD = 15 // ttydefaults.h:78:1:
+ CDSUSP = 25 // ttydefaults.h:74:1:
+ CEOF = 4 // ttydefaults.h:56:1:
+ CEOL = 0 // ttydefaults.h:60:1:
+ CEOT = 4 // ttydefaults.h:81:1:
+ CERASE = 0177 // ttydefaults.h:62:1:
+ CFLUSH = 15 // ttydefaults.h:85:1:
+ CIBAUD = 002003600000 // termios-baud.h:27:1:
+ CINTR = 3 // ttydefaults.h:63:1:
+ CKILL = 21 // ttydefaults.h:69:1:
+ CLNEXT = 22 // ttydefaults.h:77:1:
+ CLOCAL = 0004000 // termios-c_cflag.h:34:1:
+ CMIN = 1 // ttydefaults.h:70:1:
+ CMSPAR = 010000000000 // termios-baud.h:28:1:
+ CQUIT = 034 // ttydefaults.h:71:1:
+ CR0 = 0000000 // termios-c_oflag.h:38:1:
+ CR1 = 0001000 // termios-c_oflag.h:39:1:
+ CR2 = 0002000 // termios-c_oflag.h:40:1:
+ CR3 = 0003000 // termios-c_oflag.h:41:1:
+ CRDLY = 0003000 // termios-c_oflag.h:37:1:
+ CREAD = 0000200 // termios-c_cflag.h:30:1:
+ CREPRINT = 18 // ttydefaults.h:80:1:
+ CRPRNT = 18 // ttydefaults.h:84:1:
+ CRTSCTS = 020000000000 // termios-baud.h:29:1:
+ CS5 = 0000000 // termios-c_cflag.h:25:1:
+ CS6 = 0000020 // termios-c_cflag.h:26:1:
+ CS7 = 0000040 // termios-c_cflag.h:27:1:
+ CS8 = 0000060 // termios-c_cflag.h:28:1:
+ CSIZE = 0000060 // termios-c_cflag.h:24:1:
+ CSTART = 17 // ttydefaults.h:75:1:
+ CSTATUS = 0 // ttydefaults.h:67:1:
+ CSTOP = 19 // ttydefaults.h:76:1:
+ CSTOPB = 0000100 // termios-c_cflag.h:29:1:
+ CSUSP = 26 // ttydefaults.h:72:1:
+ CTIME = 0 // ttydefaults.h:73:1:
+ CWERASE = 23 // ttydefaults.h:79:1:
+ ECHO = 0000010 // termios-c_lflag.h:29:1:
+ ECHOCTL = 0001000 // termios-c_lflag.h:37:1:
+ ECHOE = 0000020 // termios-c_lflag.h:30:1:
+ ECHOK = 0000040 // termios-c_lflag.h:32:1:
+ ECHOKE = 0004000 // termios-c_lflag.h:45:1:
+ ECHONL = 0000100 // termios-c_lflag.h:33:1:
+ ECHOPRT = 0002000 // termios-c_lflag.h:42:1:
+ EXTA = 14 // termios.h:50:1:
+ EXTB = 15 // termios.h:51:1:
+ EXTPROC = 0200000 // termios-c_lflag.h:57:1:
+ FF0 = 0000000 // termios-c_oflag.h:51:1:
+ FF1 = 0100000 // termios-c_oflag.h:52:1:
+ FFDLY = 0100000 // termios-c_oflag.h:50:1:
+ FLUSHO = 0010000 // termios-c_lflag.h:48:1:
+ HUPCL = 0002000 // termios-c_cflag.h:33:1:
+ ICANON = 0000002 // termios-c_lflag.h:25:1:
+ ICRNL = 0000400 // termios-c_iflag.h:32:1:
+ IEXTEN = 0100000 // termios-c_lflag.h:54:1:
+ IGNBRK = 0000001 // termios-c_iflag.h:24:1:
+ IGNCR = 0000200 // termios-c_iflag.h:31:1:
+ IGNPAR = 0000004 // termios-c_iflag.h:26:1:
+ IMAXBEL = 0020000 // termios-c_iflag.h:38:1:
+ INLCR = 0000100 // termios-c_iflag.h:30:1:
+ INPCK = 0000020 // termios-c_iflag.h:28:1:
+ ISIG = 0000001 // termios-c_lflag.h:24:1:
+ ISTRIP = 0000040 // termios-c_iflag.h:29:1:
+ IUCLC = 0001000 // termios-c_iflag.h:33:1:
+ IUTF8 = 0040000 // termios-c_iflag.h:40:1:
+ IXANY = 0004000 // termios-c_iflag.h:36:1:
+ IXOFF = 0010000 // termios-c_iflag.h:37:1:
+ IXON = 0002000 // termios-c_iflag.h:35:1:
+ NCCS = 32 // termios-struct.h:23:1:
+ NL0 = 0000000 // termios-c_oflag.h:35:1:
+ NL1 = 0000400 // termios-c_oflag.h:36:1:
+ NLDLY = 0000400 // termios-c_oflag.h:34:1:
+ NOFLSH = 0000200 // termios-c_lflag.h:34:1:
+ OCRNL = 0000010 // termios-c_oflag.h:28:1:
+ OFDEL = 0000200 // termios-c_oflag.h:32:1:
+ OFILL = 0000100 // termios-c_oflag.h:31:1:
+ OLCUC = 0000002 // termios-c_oflag.h:25:1:
+ ONLCR = 0000004 // termios-c_oflag.h:27:1:
+ ONLRET = 0000040 // termios-c_oflag.h:30:1:
+ ONOCR = 0000020 // termios-c_oflag.h:29:1:
+ OPOST = 0000001 // termios-c_oflag.h:24:1:
+ PARENB = 0000400 // termios-c_cflag.h:31:1:
+ PARMRK = 0000010 // termios-c_iflag.h:27:1:
+ PARODD = 0001000 // termios-c_cflag.h:32:1:
+ PENDIN = 0040000 // termios-c_lflag.h:50:1:
+ TAB0 = 0000000 // termios-c_oflag.h:43:1:
+ TAB1 = 0004000 // termios-c_oflag.h:44:1:
+ TAB2 = 0010000 // termios-c_oflag.h:45:1:
+ TAB3 = 0014000 // termios-c_oflag.h:46:1:
+ TABDLY = 0014000 // termios-c_oflag.h:42:1:
+ TCIFLUSH = 0 // termios.h:70:1:
+ TCIOFF = 2 // termios.h:66:1:
+ TCIOFLUSH = 2 // termios.h:72:1:
+ TCION = 3 // termios.h:67:1:
+ TCOFLUSH = 1 // termios.h:71:1:
+ TCOOFF = 0 // termios.h:64:1:
+ TCOON = 1 // termios.h:65:1:
+ TCSADRAIN = 1 // termios-tcflow.h:25:1:
+ TCSAFLUSH = 2 // termios-tcflow.h:26:1:
+ TCSANOW = 0 // termios-tcflow.h:24:1:
+ TIOCSER_TEMT = 0x01 // termios.h:60:1:
+ TOSTOP = 0000400 // termios-c_lflag.h:35:1:
+ TTYDEF_CFLAG = 1440 // ttydefaults.h:49:1:
+ TTYDEF_IFLAG = 11554 // ttydefaults.h:46:1:
+ TTYDEF_LFLAG = 35355 // ttydefaults.h:48:1:
+ TTYDEF_OFLAG = 6149 // ttydefaults.h:47:1:
+ TTYDEF_SPEED = 13 // ttydefaults.h:50:1:
+ VDISCARD = 13 // termios-c_cc.h:37:1:
+ VEOF = 4 // termios-c_cc.h:28:1:
+ VEOL = 11 // termios-c_cc.h:35:1:
+ VEOL2 = 16 // termios-c_cc.h:40:1:
+ VERASE = 2 // termios-c_cc.h:26:1:
+ VINTR = 0 // termios-c_cc.h:24:1:
+ VKILL = 3 // termios-c_cc.h:27:1:
+ VLNEXT = 15 // termios-c_cc.h:39:1:
+ VMIN = 6 // termios-c_cc.h:30:1:
+ VQUIT = 1 // termios-c_cc.h:25:1:
+ VREPRINT = 12 // termios-c_cc.h:36:1:
+ VSTART = 8 // termios-c_cc.h:32:1:
+ VSTOP = 9 // termios-c_cc.h:33:1:
+ VSUSP = 10 // termios-c_cc.h:34:1:
+ VSWTC = 7 // termios-c_cc.h:31:1:
+ VT0 = 0000000 // termios-c_oflag.h:56:1:
+ VT1 = 0040000 // termios-c_oflag.h:57:1:
+ VTDLY = 0040000 // termios-c_oflag.h:55:1:
+ VTIME = 5 // termios-c_cc.h:29:1:
+ VWERASE = 14 // termios-c_cc.h:38:1:
+ XCASE = 0000004 // termios-c_lflag.h:27:1:
+ XTABS = 0014000 // termios-c_oflag.h:60:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1 // termios-struct.h:34:1:
+ X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1 // termios-struct.h:35:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:41:1:
+ X_TERMIOS_H = 1 // termios.h:23:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -219,7 +231,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -238,7 +250,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -270,6 +282,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -285,12 +299,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -331,6 +348,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -401,6 +420,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -419,9 +494,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -449,7 +530,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -470,23 +552,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -499,6 +582,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -519,8 +604,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -530,6 +615,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -558,8 +646,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -590,11 +683,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -604,11 +700,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -642,6 +754,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -655,6 +783,23 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
@@ -662,7 +807,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// We need `pid_t'.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -681,7 +826,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -698,11 +843,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -719,7 +878,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -738,14 +897,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -785,8 +944,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -800,14 +959,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -818,10 +975,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -848,7 +1007,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -860,71 +1019,72 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type Pid_t = X__pid_t /* termios.h:30:17 */
+type Pid_t = int32 /* termios.h:30:17 */
// Get the system-dependent definitions of `struct termios', `tcflag_t',
// `cc_t', `speed_t', and all the macros specifying the flag bits.
// termios type and macro definitions. Linux version.
-// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// Copyright (C) 1993-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -946,7 +1106,7 @@ type Speed_t = uint32 /* termios.h:24:22 */
type Tcflag_t = uint32 /* termios.h:25:22 */
// struct termios definition. Linux/generic version.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -964,15 +1124,15 @@ type Tcflag_t = uint32 /* termios.h:25:22 */
// <https://www.gnu.org/licenses/>.
type Termios = struct {
- Fc_iflag Tcflag_t
- Fc_oflag Tcflag_t
- Fc_cflag Tcflag_t
- Fc_lflag Tcflag_t
- Fc_line Cc_t
- Fc_cc [32]Cc_t
+ Fc_iflag uint32
+ Fc_oflag uint32
+ Fc_cflag uint32
+ Fc_lflag uint32
+ Fc_line uint8
+ Fc_cc [32]uint8
F__ccgo_pad1 [3]byte
- Fc_ispeed Speed_t
- Fc_ospeed Speed_t
+ Fc_ispeed uint32
+ Fc_ospeed uint32
} /* termios-struct.h:24:1 */
// -
diff --git a/vendor/modernc.org/libc/termios/termios_linux_mips64le.go b/vendor/modernc.org/libc/termios/termios_linux_mips64le.go
new file mode 100644
index 000000000..494b20174
--- /dev/null
+++ b/vendor/modernc.org/libc/termios/termios_linux_mips64le.go
@@ -0,0 +1,1024 @@
+// 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_linux_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 (
+ B0 = 0000000 // termios.h:33:1:
+ B1000000 = 0010010 // termios-baud.h:40:1:
+ B110 = 0000003 // termios.h:36:1:
+ B115200 = 0010002 // termios-baud.h:34:1:
+ B1152000 = 0010011 // termios-baud.h:41:1:
+ B1200 = 0000011 // termios.h:42:1:
+ B134 = 0000004 // termios.h:37:1:
+ B150 = 0000005 // termios.h:38:1:
+ B1500000 = 0010012 // termios-baud.h:42:1:
+ B1800 = 0000012 // termios.h:43:1:
+ B19200 = 0000016 // termios.h:47:1:
+ B200 = 0000006 // termios.h:39:1:
+ B2000000 = 0010013 // termios-baud.h:43:1:
+ B230400 = 0010003 // termios-baud.h:35:1:
+ B2400 = 0000013 // termios.h:44:1:
+ B2500000 = 0010014 // termios-baud.h:44:1:
+ B300 = 0000007 // termios.h:40:1:
+ B3000000 = 0010015 // termios-baud.h:45:1:
+ B3500000 = 0010016 // termios-baud.h:46:1:
+ B38400 = 0000017 // termios.h:48:1:
+ B4000000 = 0010017 // termios-baud.h:47:1:
+ B460800 = 0010004 // termios-baud.h:36:1:
+ B4800 = 0000014 // termios.h:45:1:
+ B50 = 0000001 // termios.h:34:1:
+ B500000 = 0010005 // termios-baud.h:37:1:
+ B57600 = 0010001 // termios-baud.h:33:1:
+ B576000 = 0010006 // termios-baud.h:38:1:
+ B600 = 0000010 // termios.h:41:1:
+ B75 = 0000002 // termios.h:35:1:
+ B921600 = 0010007 // termios-baud.h:39:1:
+ B9600 = 0000015 // termios.h:46:1:
+ BRKINT = 0000002 // termios-c_iflag.h:25:1:
+ BS0 = 0000000 // termios-c_oflag.h:48:1:
+ BS1 = 0020000 // termios-c_oflag.h:49:1:
+ BSDLY = 0020000 // termios-c_oflag.h:47:1:
+ CBAUD = 000000010017 // termios-baud.h:24:1:
+ CBAUDEX = 000000010000 // termios-baud.h:25:1:
+ CBRK = 0 // ttydefaults.h:83:1:
+ CDISCARD = 15 // ttydefaults.h:78:1:
+ CDSUSP = 25 // ttydefaults.h:74:1:
+ CEOF = 4 // ttydefaults.h:56:1:
+ CEOL = 0 // ttydefaults.h:60:1:
+ CEOT = 4 // ttydefaults.h:81:1:
+ CERASE = 0177 // ttydefaults.h:62:1:
+ CFLUSH = 15 // ttydefaults.h:85:1:
+ CIBAUD = 002003600000 // termios-baud.h:27:1:
+ CINTR = 3 // ttydefaults.h:63:1:
+ CKILL = 21 // ttydefaults.h:69:1:
+ CLNEXT = 22 // ttydefaults.h:77:1:
+ CLOCAL = 0004000 // termios-c_cflag.h:34:1:
+ CMIN = 1 // ttydefaults.h:70:1:
+ CMSPAR = 010000000000 // termios-baud.h:28:1:
+ CQUIT = 034 // ttydefaults.h:71:1:
+ CR0 = 0000000 // termios-c_oflag.h:38:1:
+ CR1 = 0001000 // termios-c_oflag.h:39:1:
+ CR2 = 0002000 // termios-c_oflag.h:40:1:
+ CR3 = 0003000 // termios-c_oflag.h:41:1:
+ CRDLY = 0003000 // termios-c_oflag.h:37:1:
+ CREAD = 0000200 // termios-c_cflag.h:30:1:
+ CREPRINT = 18 // ttydefaults.h:80:1:
+ CRPRNT = 18 // ttydefaults.h:84:1:
+ CRTSCTS = 020000000000 // termios-baud.h:29:1:
+ CS5 = 0000000 // termios-c_cflag.h:25:1:
+ CS6 = 0000020 // termios-c_cflag.h:26:1:
+ CS7 = 0000040 // termios-c_cflag.h:27:1:
+ CS8 = 0000060 // termios-c_cflag.h:28:1:
+ CSIZE = 0000060 // termios-c_cflag.h:24:1:
+ CSTART = 17 // ttydefaults.h:75:1:
+ CSTATUS = 0 // ttydefaults.h:67:1:
+ CSTOP = 19 // ttydefaults.h:76:1:
+ CSTOPB = 0000100 // termios-c_cflag.h:29:1:
+ CSUSP = 26 // ttydefaults.h:72:1:
+ CTIME = 0 // ttydefaults.h:73:1:
+ CWERASE = 23 // ttydefaults.h:79:1:
+ ECHO = 0000010 // termios-c_lflag.h:29:1:
+ ECHOCTL = 0001000 // termios-c_lflag.h:37:1:
+ ECHOE = 0000020 // termios-c_lflag.h:30:1:
+ ECHOK = 0000040 // termios-c_lflag.h:32:1:
+ ECHOKE = 0004000 // termios-c_lflag.h:45:1:
+ ECHONL = 0000100 // termios-c_lflag.h:33:1:
+ ECHOPRT = 0002000 // termios-c_lflag.h:42:1:
+ EXTA = 14 // termios.h:50:1:
+ EXTB = 15 // termios.h:51:1:
+ EXTPROC = 0200000 // termios-c_lflag.h:57:1:
+ FF0 = 0000000 // termios-c_oflag.h:51:1:
+ FF1 = 0100000 // termios-c_oflag.h:52:1:
+ FFDLY = 0100000 // termios-c_oflag.h:50:1:
+ FLUSHO = 0010000 // termios-c_lflag.h:48:1:
+ HUPCL = 0002000 // termios-c_cflag.h:33:1:
+ ICANON = 0000002 // termios-c_lflag.h:25:1:
+ ICRNL = 0000400 // termios-c_iflag.h:32:1:
+ IEXTEN = 0100000 // termios-c_lflag.h:54:1:
+ IGNBRK = 0000001 // termios-c_iflag.h:24:1:
+ IGNCR = 0000200 // termios-c_iflag.h:31:1:
+ IGNPAR = 0000004 // termios-c_iflag.h:26:1:
+ IMAXBEL = 0020000 // termios-c_iflag.h:38:1:
+ INLCR = 0000100 // termios-c_iflag.h:30:1:
+ INPCK = 0000020 // termios-c_iflag.h:28:1:
+ ISIG = 0000001 // termios-c_lflag.h:24:1:
+ ISTRIP = 0000040 // termios-c_iflag.h:29:1:
+ IUCLC = 0001000 // termios-c_iflag.h:33:1:
+ IUTF8 = 0040000 // termios-c_iflag.h:40:1:
+ IXANY = 0004000 // termios-c_iflag.h:36:1:
+ IXOFF = 0010000 // termios-c_iflag.h:37:1:
+ IXON = 0002000 // termios-c_iflag.h:35:1:
+ NCCS = 32 // termios-struct.h:23:1:
+ NL0 = 0000000 // termios-c_oflag.h:35:1:
+ NL1 = 0000400 // termios-c_oflag.h:36:1:
+ NLDLY = 0000400 // termios-c_oflag.h:34:1:
+ NOFLSH = 0000200 // termios-c_lflag.h:34:1:
+ OCRNL = 0000010 // termios-c_oflag.h:28:1:
+ OFDEL = 0000200 // termios-c_oflag.h:32:1:
+ OFILL = 0000100 // termios-c_oflag.h:31:1:
+ OLCUC = 0000002 // termios-c_oflag.h:25:1:
+ ONLCR = 0000004 // termios-c_oflag.h:27:1:
+ ONLRET = 0000040 // termios-c_oflag.h:30:1:
+ ONOCR = 0000020 // termios-c_oflag.h:29:1:
+ OPOST = 0000001 // termios-c_oflag.h:24:1:
+ PARENB = 0000400 // termios-c_cflag.h:31:1:
+ PARMRK = 0000010 // termios-c_iflag.h:27:1:
+ PARODD = 0001000 // termios-c_cflag.h:32:1:
+ PENDIN = 0040000 // termios-c_lflag.h:50:1:
+ TAB0 = 0000000 // termios-c_oflag.h:43:1:
+ TAB1 = 0004000 // termios-c_oflag.h:44:1:
+ TAB2 = 0010000 // termios-c_oflag.h:45:1:
+ TAB3 = 0014000 // termios-c_oflag.h:46:1:
+ TABDLY = 0014000 // termios-c_oflag.h:42:1:
+ TCIFLUSH = 0 // termios.h:70:1:
+ TCIOFF = 2 // termios.h:66:1:
+ TCIOFLUSH = 2 // termios.h:72:1:
+ TCION = 3 // termios.h:67:1:
+ TCOFLUSH = 1 // termios.h:71:1:
+ TCOOFF = 0 // termios.h:64:1:
+ TCOON = 1 // termios.h:65:1:
+ TCSADRAIN = 1 // termios-tcflow.h:25:1:
+ TCSAFLUSH = 2 // termios-tcflow.h:26:1:
+ TCSANOW = 0 // termios-tcflow.h:24:1:
+ TIOCSER_TEMT = 0x01 // termios.h:60:1:
+ TOSTOP = 0000400 // termios-c_lflag.h:35:1:
+ TTYDEF_CFLAG = 1440 // ttydefaults.h:49:1:
+ TTYDEF_IFLAG = 11554 // ttydefaults.h:46:1:
+ TTYDEF_LFLAG = 35355 // ttydefaults.h:48:1:
+ TTYDEF_OFLAG = 6149 // ttydefaults.h:47:1:
+ TTYDEF_SPEED = 13 // ttydefaults.h:50:1:
+ VDISCARD = 13 // termios-c_cc.h:37:1:
+ VEOF = 4 // termios-c_cc.h:28:1:
+ VEOL = 11 // termios-c_cc.h:35:1:
+ VEOL2 = 16 // termios-c_cc.h:40:1:
+ VERASE = 2 // termios-c_cc.h:26:1:
+ VINTR = 0 // termios-c_cc.h:24:1:
+ VKILL = 3 // termios-c_cc.h:27:1:
+ VLNEXT = 15 // termios-c_cc.h:39:1:
+ VMIN = 6 // termios-c_cc.h:30:1:
+ VQUIT = 1 // termios-c_cc.h:25:1:
+ VREPRINT = 12 // termios-c_cc.h:36:1:
+ VSTART = 8 // termios-c_cc.h:32:1:
+ VSTOP = 9 // termios-c_cc.h:33:1:
+ VSUSP = 10 // termios-c_cc.h:34:1:
+ VSWTC = 7 // termios-c_cc.h:31:1:
+ VT0 = 0000000 // termios-c_oflag.h:56:1:
+ VT1 = 0040000 // termios-c_oflag.h:57:1:
+ VTDLY = 0040000 // termios-c_oflag.h:55:1:
+ VTIME = 5 // termios-c_cc.h:29:1:
+ VWERASE = 14 // termios-c_cc.h:38:1:
+ XCASE = 0000004 // termios-c_lflag.h:27:1:
+ XTABS = 0014000 // termios-c_oflag.h:60:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1 // termios-struct.h:34:1:
+ X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1 // termios-struct.h:35:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:41:1:
+ X_TERMIOS_H = 1 // termios.h:23:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// We need `pid_t'.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type Pid_t = X__pid_t /* termios.h:30:17 */
+
+// Get the system-dependent definitions of `struct termios', `tcflag_t',
+// `cc_t', `speed_t', and all the macros specifying the flag bits.
+// termios type and macro definitions. Linux version.
+// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+type Cc_t = uint8 /* termios.h:23:23 */
+type Speed_t = uint32 /* termios.h:24:22 */
+type Tcflag_t = uint32 /* termios.h:25:22 */
+
+// struct termios definition. Linux/generic version.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library. If not, see
+// <https://www.gnu.org/licenses/>.
+
+type Termios = struct {
+ Fc_iflag Tcflag_t
+ Fc_oflag Tcflag_t
+ Fc_cflag Tcflag_t
+ Fc_lflag Tcflag_t
+ Fc_line Cc_t
+ Fc_cc [32]Cc_t
+ F__ccgo_pad1 [3]byte
+ Fc_ispeed Speed_t
+ Fc_ospeed Speed_t
+} /* termios-struct.h:24:1 */
+
+// -
+// 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.
+// 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.
+//
+// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
+
+// System wide defaults for terminal state. Linux version.
+
+// 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_illumos_amd64.go b/vendor/modernc.org/libc/time/capi_illumos_amd64.go
new file mode 100644
index 000000000..22a7a7d0e
--- /dev/null
+++ b/vendor/modernc.org/libc/time/capi_illumos_amd64.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_illumos_amd64.go -pkgname time', DO NOT EDIT.
+
+package time
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/time/capi_linux_loong64.go b/vendor/modernc.org/libc/time/capi_linux_loong64.go
index fef9264df..4bdcc62e5 100644
--- a/vendor/modernc.org/libc/time/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/time/capi_linux_loong64.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 -ignore-unsupported-alignment -o time/time_linux_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_linux_loong64.go -pkgname time', DO NOT EDIT.
package time
diff --git a/vendor/modernc.org/libc/time/capi_linux_mips64le.go b/vendor/modernc.org/libc/time/capi_linux_mips64le.go
new file mode 100644
index 000000000..fef9264df
--- /dev/null
+++ b/vendor/modernc.org/libc/time/capi_linux_mips64le.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_linux_amd64.go -pkgname time', DO NOT EDIT.
+
+package time
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/time/time_illumos_amd64.go b/vendor/modernc.org/libc/time/time_illumos_amd64.go
new file mode 100644
index 000000000..01b4e776d
--- /dev/null
+++ b/vendor/modernc.org/libc/time/time_illumos_amd64.go
@@ -0,0 +1,1468 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // time_iso.h:69:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // time_iso.h:60:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // time_iso.h:74:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */ // size of something in bytes
+
+type Clock_t = int64 /* time_iso.h:70:14 */
+
+type Time_t = int64 /* time_iso.h:75: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
+} /* time_iso.h:80:1 */
+
+// C11 requires sys/time_impl.h for the definition of the struct timespec.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// C11 requires sys/time_impl.h for the definition of the struct timespec.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // process id type
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+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 a613fec61..7947e88a4 100644
--- a/vendor/modernc.org/libc/time/time_linux_386.go
+++ b/vendor/modernc.org/libc/time/time_linux_386.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7
CLOCK_BOOTTIME_ALARM = 9
CLOCK_MONOTONIC = 1
diff --git a/vendor/modernc.org/libc/time/time_linux_amd64.go b/vendor/modernc.org/libc/time/time_linux_amd64.go
index 1e08a9c98..21f9ecb4b 100644
--- a/vendor/modernc.org/libc/time/time_linux_amd64.go
+++ b/vendor/modernc.org/libc/time/time_linux_amd64.go
@@ -63,7 +63,7 @@ const (
Unix = 1 // <predefined>:177:1:
// #define CLOCKS_PER_SEC ((__clock_t) 1000000)
- CLOCKS_PER_SEC = 1000000
+ CLOCKS_PER_SEC = 1000000
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
diff --git a/vendor/modernc.org/libc/time/time_linux_arm.go b/vendor/modernc.org/libc/time/time_linux_arm.go
index 02a06cf5d..7aa418dc1 100644
--- a/vendor/modernc.org/libc/time/time_linux_arm.go
+++ b/vendor/modernc.org/libc/time/time_linux_arm.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7
CLOCK_BOOTTIME_ALARM = 9
CLOCK_MONOTONIC = 1
diff --git a/vendor/modernc.org/libc/time/time_linux_arm64.go b/vendor/modernc.org/libc/time/time_linux_arm64.go
index 75faedcd8..702e082b5 100644
--- a/vendor/modernc.org/libc/time/time_linux_arm64.go
+++ b/vendor/modernc.org/libc/time/time_linux_arm64.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7
CLOCK_BOOTTIME_ALARM = 9
CLOCK_MONOTONIC = 1
diff --git a/vendor/modernc.org/libc/time/time_linux_loong64.go b/vendor/modernc.org/libc/time/time_linux_loong64.go
index e7f73f0dd..2ed0c7fa8 100644
--- a/vendor/modernc.org/libc/time/time_linux_loong64.go
+++ b/vendor/modernc.org/libc/time/time_linux_loong64.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 -ignore-unsupported-alignment -o time/time_linux_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_linux_loong64.go -pkgname time', DO NOT EDIT.
package time
@@ -15,52 +15,64 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- CLOCK_BOOTTIME = 7 // time.h:60:1:
- CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
- CLOCK_MONOTONIC = 1 // time.h:48:1:
- CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
- CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
- CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
- CLOCK_REALTIME = 0 // time.h:46:1:
- CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
- CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
- CLOCK_TAI = 11 // time.h:66:1:
- CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
- TIMER_ABSTIME = 1 // time.h:69:1:
- TIME_UTC = 1 // time.h:65:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TIME_H = 1 // time.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
- X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_TIME_H = 1 // time.h:23:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ CLOCKS_PER_SEC = 1000000
+ CLOCK_BOOTTIME = 7 // time.h:60:1:
+ CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
+ CLOCK_MONOTONIC = 1 // time.h:48:1:
+ CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
+ CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
+ CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
+ CLOCK_REALTIME = 0 // time.h:46:1:
+ CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
+ CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
+ CLOCK_TAI = 11 // time.h:66:1:
+ CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
+ TIMER_ABSTIME = 1 // time.h:69:1:
+ TIME_UTC = 1 // time.h:65:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TIME_H = 1 // time.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:20:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_TIME_H = 1 // time.h:23:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -94,7 +106,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This defines CLOCKS_PER_SEC, which is the number of processor clock
// ticks per second, and possibly a number of other constants.
// System-dependent timing definitions. Linux version.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -114,7 +126,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <time.h> instead.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -133,7 +145,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -150,11 +162,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -171,7 +197,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -190,14 +216,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -237,8 +263,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -252,14 +278,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -270,10 +294,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -300,7 +326,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -312,60 +338,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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
@@ -396,7 +423,7 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// may also need to be defined by other headers.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -416,10 +443,10 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `clock'.
-type Clock_t = X__clock_t /* clock_t.h:7:19 */
+type Clock_t = int64 /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -439,10 +466,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -480,7 +507,7 @@ type Tm = struct {
// NB: Include guard matches what <linux/time.h> uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -500,7 +527,7 @@ type Tm = struct {
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -527,7 +554,7 @@ type Tm = struct {
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
@@ -536,12 +563,12 @@ type Tm = struct {
//
// has nanoseconds instead of microseconds.
type Timespec = struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:10:1 */
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* struct_timespec.h:11:1 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -561,10 +588,10 @@ type Timespec = struct {
// Never include this file directly; use <sys/types.h> instead.
// Clock ID used in clock and timer functions.
-type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+type Clockid_t = int32 /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -584,10 +611,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// Never include this file directly; use <sys/types.h> instead.
// Timer ID returned by `timer_create'.
-type Timer_t = X__timer_t /* timer_t.h:7:19 */
+type Timer_t = uintptr /* timer_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -611,19 +638,19 @@ type Timer_t = X__timer_t /* timer_t.h:7:19 */
// POSIX.1b structure for timer start values and intervals.
type Itimerspec = struct {
Fit_interval struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
Fit_value struct {
- Ftv_sec X__time_t
- Ftv_nsec X__syscall_slong_t
+ Ftv_sec int64
+ Ftv_nsec int64
}
} /* struct_itimerspec.h:8:1 */
-type Pid_t = X__pid_t /* time.h:54:17 */
+type Pid_t = int32 /* time.h:54:17 */
// Definition of locale_t.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -641,9 +668,8 @@ type Pid_t = X__pid_t /* time.h:54:17 */
// <https://www.gnu.org/licenses/>.
// Definition of struct __locale_struct and __locale_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
-// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -670,10 +696,10 @@ type X__locale_struct = struct {
F__ctype_tolower uintptr
F__ctype_toupper uintptr
F__names [13]uintptr
-} /* __locale_t.h:28:1 */
+} /* __locale_t.h:27:1 */
-type X__locale_t = uintptr /* __locale_t.h:42:32 */
+type X__locale_t = uintptr /* __locale_t.h:41:32 */
-type Locale_t = X__locale_t /* locale_t.h:24:20 */
+type Locale_t = uintptr /* locale_t.h:24:20 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/time/time_linux_mips64le.go b/vendor/modernc.org/libc/time/time_linux_mips64le.go
new file mode 100644
index 000000000..21f9ecb4b
--- /dev/null
+++ b/vendor/modernc.org/libc/time/time_linux_mips64le.go
@@ -0,0 +1,682 @@
+// 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_linux_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 (
+ CLOCK_BOOTTIME = 7 // time.h:60:1:
+ CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
+ CLOCK_MONOTONIC = 1 // time.h:48:1:
+ CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
+ CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
+ CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
+ CLOCK_REALTIME = 0 // time.h:46:1:
+ CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
+ CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
+ CLOCK_TAI = 11 // time.h:66:1:
+ CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
+ TIMER_ABSTIME = 1 // time.h:69:1:
+ TIME_UTC = 1 // time.h:65:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TIME_H = 1 // time.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_TIME_H = 1 // time.h:23:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+
+ // #define CLOCKS_PER_SEC ((__clock_t) 1000000)
+ CLOCKS_PER_SEC = 1000000
+)
+
+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 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This defines CLOCKS_PER_SEC, which is the number of processor clock
+// ticks per second, and possibly a number of other constants.
+// System-dependent timing definitions. Linux version.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <time.h> instead.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// ISO/IEC 9899:1999 7.23.1: Components of time
+// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+// the number per second of the value returned by the `clock' function.
+// CAE XSH, Issue 4, Version 2: <time.h>
+// The value of CLOCKS_PER_SEC is required to be 1 million on all
+// XSI-conformant systems.
+
+// Identifier for system-wide realtime clock.
+// Monotonic system-wide clock.
+// High-resolution timer from the CPU.
+// Thread-specific CPU-time clock.
+// Monotonic system-wide clock, not adjusted for frequency scaling.
+// Identifier for system-wide realtime clock, updated only on ticks.
+// Monotonic system-wide clock, updated only on ticks.
+// Monotonic system-wide clock that includes time spent in suspension.
+// Like CLOCK_REALTIME but also wakes suspended system.
+// Like CLOCK_BOOTTIME but also wakes suspended system.
+// Like CLOCK_REALTIME but in International Atomic Time.
+
+// Flag to indicate time is absolute.
+
+// Many of the typedefs and structs whose official home is this header
+// may also need to be defined by other headers.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// ISO C `broken-down time' structure.
+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
+} /* struct_tm.h:7:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// POSIX.1b structure for timer start values and intervals.
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fit_value struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+} /* struct_itimerspec.h:8:1 */
+
+type Pid_t = X__pid_t /* time.h:54:17 */
+
+// Definition of locale_t.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of struct __locale_struct and __locale_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX.1-2008: the locale_t type, representing a locale context
+// (implementation-namespace version). This type should be treated
+// as opaque by applications; some details are exposed for the sake of
+// efficiency in e.g. ctype functions.
+
+type X__locale_struct = struct {
+ F__locales [13]uintptr
+ F__ctype_b uintptr
+ F__ctype_tolower uintptr
+ F__ctype_toupper uintptr
+ F__names [13]uintptr
+} /* __locale_t.h:28:1 */
+
+type X__locale_t = uintptr /* __locale_t.h:42:32 */
+
+type Locale_t = X__locale_t /* locale_t.h:24:20 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/time/time_linux_ppc64le.go b/vendor/modernc.org/libc/time/time_linux_ppc64le.go
index 806f6dc9c..358f9b273 100644
--- a/vendor/modernc.org/libc/time/time_linux_ppc64le.go
+++ b/vendor/modernc.org/libc/time/time_linux_ppc64le.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7 // time.h:60:1:
CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
CLOCK_MONOTONIC = 1 // time.h:48:1:
diff --git a/vendor/modernc.org/libc/time/time_linux_riscv64.go b/vendor/modernc.org/libc/time/time_linux_riscv64.go
index bb44255fc..263041491 100644
--- a/vendor/modernc.org/libc/time/time_linux_riscv64.go
+++ b/vendor/modernc.org/libc/time/time_linux_riscv64.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7
CLOCK_BOOTTIME_ALARM = 9
CLOCK_MONOTONIC = 1
diff --git a/vendor/modernc.org/libc/time/time_linux_s390x.go b/vendor/modernc.org/libc/time/time_linux_s390x.go
index 7c0a4e8c1..95d4e69f5 100644
--- a/vendor/modernc.org/libc/time/time_linux_s390x.go
+++ b/vendor/modernc.org/libc/time/time_linux_s390x.go
@@ -15,6 +15,7 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
+ CLOCKS_PER_SEC = 1000000
CLOCK_BOOTTIME = 7
CLOCK_BOOTTIME_ALARM = 9
CLOCK_MONOTONIC = 1
diff --git a/vendor/modernc.org/libc/unistd/capi_illumos_amd64.go b/vendor/modernc.org/libc/unistd/capi_illumos_amd64.go
new file mode 100644
index 000000000..8b58510ae
--- /dev/null
+++ b/vendor/modernc.org/libc/unistd/capi_illumos_amd64.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_illumos_amd64.go -pkgname unistd', DO NOT EDIT.
+
+package unistd
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/unistd/capi_linux_loong64.go b/vendor/modernc.org/libc/unistd/capi_linux_loong64.go
index 4e94243cf..1dff1b3f4 100644
--- a/vendor/modernc.org/libc/unistd/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/unistd/capi_linux_loong64.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 -ignore-unsupported-alignment -o unistd/unistd_linux_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_linux_loong64.go -pkgname unistd', DO NOT EDIT.
package unistd
diff --git a/vendor/modernc.org/libc/unistd/capi_linux_mips64le.go b/vendor/modernc.org/libc/unistd/capi_linux_mips64le.go
new file mode 100644
index 000000000..4e94243cf
--- /dev/null
+++ b/vendor/modernc.org/libc/unistd/capi_linux_mips64le.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_linux_amd64.go -pkgname unistd', DO NOT EDIT.
+
+package unistd
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go b/vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go
new file mode 100644
index 000000000..63af42eeb
--- /dev/null
+++ b/vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go
@@ -0,0 +1,3180 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ F_LOCK = 1 // unistd.h:56:1:
+ F_OK = 0 // unistd.h:52:1:
+ F_TEST = 3 // unistd.h:58:1:
+ F_TLOCK = 2 // unistd.h:57:1:
+ F_ULOCK = 0 // unistd.h:55:1:
+ GF_PATH = "/etc/group" // unistd.h:87:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ PF_PATH = "/etc/passwd" // unistd.h:88:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ R_OK = 4 // unistd.h:49:1:
+ SEC = 1 // time.h:244:1:
+ SEEK_CUR = 1 // unistd.h:68:1:
+ SEEK_DATA = 3 // unistd.h:77:1:
+ SEEK_END = 2 // unistd.h:72:1:
+ SEEK_HOLE = 4 // unistd.h:81:1:
+ SEEK_SET = 0 // unistd.h:64:1:
+ STDERR_FILENO = 2 // unistd.h:185:1:
+ STDIN_FILENO = 0 // unistd.h:183:1:
+ STDOUT_FILENO = 1 // unistd.h:184:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ W_OK = 2 // unistd.h:50:1:
+ X_OK = 1 // unistd.h:51:1:
+ X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
+ X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
+ X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
+ X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
+ X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
+ X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
+ X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
+ X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
+ X_CS_LFS_LIBS = 70 // unistd.h:58:1:
+ X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
+ X_CS_PATH = 65 // unistd.h:50:1:
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
+ X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
+ X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
+ X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LFS64_ASYNCHRONOUS_IO = 1 // unistd.h:195:1:
+ X_LFS64_LARGEFILE = 1 // unistd.h:193:1:
+ X_LFS64_STDIO = 1 // unistd.h:194:1:
+ X_LFS_LARGEFILE = 1 // unistd.h:192:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
+ X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
+ X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
+ X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
+ X_PC_ASYNC_IO = 10 // unistd.h:299:1:
+ X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
+ X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
+ X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
+ X_PC_LAST = 101 // unistd.h:336:1:
+ X_PC_LINK_MAX = 1 // unistd.h:289:1:
+ X_PC_MAX_CANON = 2 // unistd.h:290:1:
+ X_PC_MAX_INPUT = 3 // unistd.h:291:1:
+ X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
+ X_PC_NAME_MAX = 4 // unistd.h:292:1:
+ X_PC_NO_TRUNC = 7 // unistd.h:295:1:
+ X_PC_PATH_MAX = 5 // unistd.h:293:1:
+ X_PC_PIPE_BUF = 6 // unistd.h:294:1:
+ X_PC_PRIO_IO = 11 // unistd.h:300:1:
+ X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
+ X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
+ X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
+ X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
+ X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
+ X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
+ X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
+ X_PC_SYNC_IO = 12 // unistd.h:301:1:
+ X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
+ X_PC_VDISABLE = 8 // unistd.h:296:1:
+ X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
+ X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
+ X_POSIX2_C_BIND = 1 // unistd.h:401:1:
+ X_POSIX2_C_DEV = 1 // unistd.h:402:1:
+ X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
+ X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
+ X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
+ X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
+ X_POSIX2_UPE = 1 // unistd.h:406:1:
+ X_POSIX2_VERSION = 199209 // unistd.h:363:1:
+ X_POSIX_ADVISORY_INFO = 200112 // unistd.h:156:1:
+ X_POSIX_ASYNCHRONOUS_IO = 1 // unistd.h:120:1:
+ X_POSIX_ASYNC_IO = 1 // unistd.h:98:1:
+ X_POSIX_BARRIERS = 200112 // unistd.h:157:1:
+ X_POSIX_CLOCK_SELECTION = 200112 // unistd.h:158:1:
+ X_POSIX_FSYNC = 1 // unistd.h:121:1:
+ X_POSIX_IPV6 = 200112 // unistd.h:159:1:
+ X_POSIX_JOB_CONTROL = 1 // unistd.h:99:1:
+ X_POSIX_MAPPED_FILES = 1 // unistd.h:122:1:
+ X_POSIX_MEMLOCK = 1 // unistd.h:123:1:
+ X_POSIX_MEMLOCK_RANGE = 1 // unistd.h:124:1:
+ X_POSIX_MEMORY_PROTECTION = 1 // unistd.h:125:1:
+ X_POSIX_MESSAGE_PASSING = 1 // unistd.h:126:1:
+ X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:160:1:
+ X_POSIX_PRIORITY_SCHEDULING = 1 // unistd.h:127:1:
+ X_POSIX_RAW_SOCKETS = 200112 // unistd.h:161:1:
+ X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:162:1:
+ X_POSIX_REALTIME_SIGNALS = 1 // unistd.h:128:1:
+ X_POSIX_REGEXP = 1 // unistd.h:410:1:
+ X_POSIX_SAVED_IDS = 1 // unistd.h:100:1:
+ X_POSIX_SEMAPHORES = 1 // unistd.h:129:1:
+ X_POSIX_SHARED_MEMORY_OBJECTS = 1 // unistd.h:130:1:
+ X_POSIX_SHELL = 1 // unistd.h:411:1:
+ X_POSIX_SPAWN = 200112 // unistd.h:163:1:
+ X_POSIX_SPIN_LOCKS = 200112 // unistd.h:164:1:
+ X_POSIX_SYNCHRONIZED_IO = 1 // unistd.h:131:1:
+ X_POSIX_SYNC_IO = 1 // unistd.h:101:1:
+ X_POSIX_THREADS = 1 // unistd.h:147:1:
+ X_POSIX_THREAD_ATTR_STACKADDR = 1 // unistd.h:148:1:
+ X_POSIX_THREAD_ATTR_STACKSIZE = 1 // unistd.h:149:1:
+ X_POSIX_THREAD_PRIORITY_SCHEDULING = 1 // unistd.h:151:1:
+ X_POSIX_THREAD_PRIO_INHERIT = 1 // unistd.h:175:1:
+ X_POSIX_THREAD_PRIO_PROTECT = 1 // unistd.h:176:1:
+ X_POSIX_THREAD_PROCESS_SHARED = 1 // unistd.h:150:1:
+ X_POSIX_THREAD_SAFE_FUNCTIONS = 1 // unistd.h:146:1:
+ X_POSIX_TIMEOUTS = 200112 // unistd.h:165:1:
+ X_POSIX_TIMERS = 1 // unistd.h:152:1:
+ X_POSIX_VDISABLE = 0 // unistd.h:180:1:
+ X_POSIX_VERSION = 199506 // unistd.h:355:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
+ X_SC_2_C_BIND = 45 // unistd.h:153:1:
+ X_SC_2_C_DEV = 46 // unistd.h:154:1:
+ X_SC_2_C_VERSION = 47 // unistd.h:155:1:
+ X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
+ X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
+ X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
+ X_SC_2_PBS = 724 // unistd.h:246:1:
+ X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
+ X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
+ X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
+ X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
+ X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
+ X_SC_2_SW_DEV = 51 // unistd.h:159:1:
+ X_SC_2_UPE = 52 // unistd.h:160:1:
+ X_SC_2_VERSION = 53 // unistd.h:161:1:
+ X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
+ X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
+ X_SC_AIO_MAX = 19 // unistd.h:126:1:
+ X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
+ X_SC_ARG_MAX = 1 // unistd.h:106:1:
+ X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
+ X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
+ X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
+ X_SC_BARRIERS = 732 // unistd.h:253:1:
+ X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
+ X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
+ X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
+ X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
+ X_SC_CHILD_MAX = 2 // unistd.h:107:1:
+ X_SC_CLK_TCK = 3 // unistd.h:108:1:
+ X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
+ X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
+ X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
+ X_SC_CPUID_MAX = 517 // unistd.h:211:1:
+ X_SC_CPUTIME = 734 // unistd.h:255:1:
+ X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
+ X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
+ X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
+ X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
+ X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
+ X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
+ X_SC_EPHID_MAX = 518 // unistd.h:212:1:
+ X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
+ X_SC_FSYNC = 23 // unistd.h:130:1:
+ X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
+ X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
+ X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
+ X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
+ X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
+ X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
+ X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
+ X_SC_IOV_MAX = 77 // unistd.h:180:1:
+ X_SC_IPV6 = 762 // unistd.h:283:1:
+ X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
+ X_SC_LINE_MAX = 60 // unistd.h:168:1:
+ X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
+ X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
+ X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
+ X_SC_MAXPID = 514 // unistd.h:208:1:
+ X_SC_MEMLOCK = 25 // unistd.h:132:1:
+ X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
+ X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
+ X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
+ X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
+ X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
+ X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
+ X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
+ X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
+ X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
+ X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
+ X_SC_OPEN_MAX = 5 // unistd.h:110:1:
+ X_SC_PAGESIZE = 11 // unistd.h:117:1:
+ X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
+ X_SC_PASS_MAX = 9 // unistd.h:115:1:
+ X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
+ X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
+ X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
+ X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
+ X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
+ X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
+ X_SC_REGEXP = 738 // unistd.h:259:1:
+ X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
+ X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
+ X_SC_SAVED_IDS = 7 // unistd.h:112:1:
+ X_SC_SEMAPHORES = 35 // unistd.h:142:1:
+ X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
+ X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
+ X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
+ X_SC_SHELL = 739 // unistd.h:260:1:
+ X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
+ X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
+ X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
+ X_SC_SPAWN = 740 // unistd.h:261:1:
+ X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
+ X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
+ X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
+ X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
+ X_SC_STACK_PROT = 515 // unistd.h:209:1:
+ X_SC_STREAM_MAX = 16 // unistd.h:122:1:
+ X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
+ X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
+ X_SC_THREADS = 576 // unistd.h:227:1:
+ X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
+ X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
+ X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
+ X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
+ X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
+ X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
+ X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
+ X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
+ X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
+ X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
+ X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
+ X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
+ X_SC_TIMEOUTS = 747 // unistd.h:268:1:
+ X_SC_TIMERS = 43 // unistd.h:150:1:
+ X_SC_TIMER_MAX = 44 // unistd.h:151:1:
+ X_SC_TRACE = 748 // unistd.h:269:1:
+ X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
+ X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
+ X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
+ X_SC_TRACE_LOG = 752 // unistd.h:273:1:
+ X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
+ X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
+ X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
+ X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
+ X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
+ X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
+ X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
+ X_SC_UADDR_MAX = 519 // unistd.h:213:1:
+ X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
+ X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
+ X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
+ X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
+ X_SC_VERSION = 8 // unistd.h:113:1:
+ X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
+ X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
+ X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
+ X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
+ X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
+ X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
+ X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
+ X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
+ X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
+ X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
+ X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
+ X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
+ X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
+ X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UNISTD_H = 0 // unistd.h:40:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_UNISTD_H = 0 // unistd.h:36:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
+ X_XOPEN_REALTIME = 1 // unistd.h:388:1:
+ X_XOPEN_SHM = 1 // unistd.h:390:1:
+ X_XOPEN_STREAMS = 1 // unistd.h:412:1:
+ X_XOPEN_UNIX = 0 // unistd.h:382:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
+ X_XOPEN_XPG3 = 0 // unistd.h:380:1:
+ X_XOPEN_XPG4 = 0 // unistd.h:381:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 PALO, Richard.
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 2013 Gary Mills
+//
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 PALO, Richard.
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 2013 Gary Mills
+//
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go b/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go
index 7a83d48f3..3b62c2f3f 100644
--- a/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go
+++ b/vendor/modernc.org/libc/unistd/unistd_linux_loong64.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 -ignore-unsupported-alignment -o unistd/unistd_linux_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_linux_loong64.go -pkgname unistd', DO NOT EDIT.
package unistd
@@ -15,142 +15,159 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- F_LOCK = 1 // unistd.h:1074:1:
- F_OK = 0 // unistd.h:284:1:
- F_TEST = 3 // unistd.h:1076:1:
- F_TLOCK = 2 // unistd.h:1075:1:
- F_ULOCK = 0 // unistd.h:1073:1:
- L_INCR = 1 // unistd.h:323:1:
- L_SET = 0 // unistd.h:322:1:
- L_XTND = 2 // unistd.h:324:1:
- R_OK = 4 // unistd.h:281:1:
- SEEK_CUR = 1 // unistd.h:312:1:
- SEEK_END = 2 // unistd.h:313:1:
- SEEK_SET = 0 // unistd.h:311:1:
- STDERR_FILENO = 2 // unistd.h:212:1:
- STDIN_FILENO = 0 // unistd.h:210:1:
- STDOUT_FILENO = 1 // unistd.h:211:1:
- W_OK = 2 // unistd.h:282:1:
- X_OK = 1 // unistd.h:283:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_POSIX_OPT_H = 1 // posix_opt.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
- X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_GCC_SIZE_T = 0 // stddef.h:195:1:
- X_GETOPT_CORE_H = 1 // getopt_core.h:21:1:
- X_GETOPT_POSIX_H = 1 // getopt_posix.h:21:1:
- X_LFS64_ASYNCHRONOUS_IO = 1 // posix_opt.h:117:1:
- X_LFS64_LARGEFILE = 1 // posix_opt.h:121:1:
- X_LFS64_STDIO = 1 // posix_opt.h:122:1:
- X_LFS_ASYNCHRONOUS_IO = 1 // posix_opt.h:112:1:
- X_LFS_LARGEFILE = 1 // posix_opt.h:120:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX2_CHAR_TERM = 200809 // posix_opt.h:179:1:
- X_POSIX2_C_BIND = 200809 // unistd.h:74:1:
- X_POSIX2_C_DEV = 200809 // unistd.h:78:1:
- X_POSIX2_C_VERSION = 200809 // unistd.h:70:1:
- X_POSIX2_LOCALEDEF = 200809 // unistd.h:86:1:
- X_POSIX2_SW_DEV = 200809 // unistd.h:82:1:
- X_POSIX2_VERSION = 200809 // unistd.h:67:1:
- X_POSIX_ADVISORY_INFO = 200809 // posix_opt.h:170:1:
- X_POSIX_ASYNCHRONOUS_IO = 200809 // posix_opt.h:109:1:
- X_POSIX_ASYNC_IO = 1 // posix_opt.h:110:1:
- X_POSIX_BARRIERS = 200809 // posix_opt.h:155:1:
- X_POSIX_CHOWN_RESTRICTED = 0 // posix_opt.h:53:1:
- X_POSIX_CLOCK_SELECTION = 200809 // posix_opt.h:167:1:
- X_POSIX_CPUTIME = 0 // posix_opt.h:128:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_FSYNC = 200809 // posix_opt.h:38:1:
- X_POSIX_IPV6 = 200809 // posix_opt.h:173:1:
- X_POSIX_JOB_CONTROL = 1 // posix_opt.h:23:1:
- X_POSIX_MAPPED_FILES = 200809 // posix_opt.h:41:1:
- X_POSIX_MEMLOCK = 200809 // posix_opt.h:44:1:
- X_POSIX_MEMLOCK_RANGE = 200809 // posix_opt.h:47:1:
- X_POSIX_MEMORY_PROTECTION = 200809 // posix_opt.h:50:1:
- X_POSIX_MESSAGE_PASSING = 200809 // posix_opt.h:158:1:
- X_POSIX_MONOTONIC_CLOCK = 0 // posix_opt.h:164:1:
- X_POSIX_NO_TRUNC = 1 // posix_opt.h:60:1:
- X_POSIX_PRIORITIZED_IO = 200809 // posix_opt.h:114:1:
- X_POSIX_PRIORITY_SCHEDULING = 200809 // posix_opt.h:32:1:
- X_POSIX_RAW_SOCKETS = 200809 // posix_opt.h:176:1:
- X_POSIX_READER_WRITER_LOCKS = 200809 // posix_opt.h:137:1:
- X_POSIX_REALTIME_SIGNALS = 200809 // posix_opt.h:106:1:
- X_POSIX_REENTRANT_FUNCTIONS = 1 // posix_opt.h:75:1:
- X_POSIX_REGEXP = 1 // posix_opt.h:134:1:
- X_POSIX_SAVED_IDS = 1 // posix_opt.h:26:1:
- X_POSIX_SEMAPHORES = 200809 // posix_opt.h:103:1:
- X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // posix_opt.h:125:1:
- X_POSIX_SHELL = 1 // posix_opt.h:140:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_POSIX_SPAWN = 200809 // posix_opt.h:149:1:
- X_POSIX_SPIN_LOCKS = 200809 // posix_opt.h:146:1:
- X_POSIX_SPORADIC_SERVER = -1 // posix_opt.h:182:1:
- X_POSIX_SYNCHRONIZED_IO = 200809 // posix_opt.h:35:1:
- X_POSIX_THREADS = 200809 // posix_opt.h:72:1:
- X_POSIX_THREAD_ATTR_STACKADDR = 200809 // posix_opt.h:85:1:
- X_POSIX_THREAD_ATTR_STACKSIZE = 200809 // posix_opt.h:82:1:
- X_POSIX_THREAD_CPUTIME = 0 // posix_opt.h:131:1:
- X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 // posix_opt.h:79:1:
- X_POSIX_THREAD_PRIO_INHERIT = 200809 // posix_opt.h:88:1:
- X_POSIX_THREAD_PRIO_PROTECT = 200809 // posix_opt.h:92:1:
- X_POSIX_THREAD_PROCESS_SHARED = 200809 // posix_opt.h:161:1:
- X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 // posix_opt.h:96:1:
- X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // posix_opt.h:99:1:
- X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 // posix_opt.h:76:1:
- X_POSIX_THREAD_SPORADIC_SERVER = -1 // posix_opt.h:183:1:
- X_POSIX_TIMEOUTS = 200809 // posix_opt.h:143:1:
- X_POSIX_TIMERS = 200809 // posix_opt.h:152:1:
- X_POSIX_TRACE = -1 // posix_opt.h:186:1:
- X_POSIX_TRACE_EVENT_FILTER = -1 // posix_opt.h:187:1:
- X_POSIX_TRACE_INHERIT = -1 // posix_opt.h:188:1:
- X_POSIX_TRACE_LOG = -1 // posix_opt.h:189:1:
- X_POSIX_TYPED_MEMORY_OBJECTS = -1 // posix_opt.h:192:1:
- X_POSIX_V6_LP64_OFF64 = 1 // environments.h:62:1:
- X_POSIX_V6_LPBIG_OFFBIG = -1 // environments.h:57:1:
- X_POSIX_V7_LP64_OFF64 = 1 // environments.h:61:1:
- X_POSIX_V7_LPBIG_OFFBIG = -1 // environments.h:56:1:
- X_POSIX_VDISABLE = 0 // posix_opt.h:57:1:
- X_POSIX_VERSION = 200809 // unistd.h:34:1:
- X_SIZET_ = 0 // stddef.h:196:1:
- X_SIZE_T = 0 // stddef.h:183:1:
- X_SIZE_T_ = 0 // stddef.h:188:1:
- X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
- X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
- X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
- X_T_SIZE = 0 // stddef.h:186:1:
- X_T_SIZE_ = 0 // stddef.h:185:1:
- X_UNISTD_H = 1 // unistd.h:23:1:
- X_XBS5_LP64_OFF64 = 1 // environments.h:63:1:
- X_XBS5_LPBIG_OFFBIG = -1 // environments.h:58:1:
- X_XOPEN_ENH_I18N = 1 // unistd.h:112:1:
- X_XOPEN_LEGACY = 1 // unistd.h:115:1:
- X_XOPEN_REALTIME = 1 // posix_opt.h:63:1:
- X_XOPEN_REALTIME_THREADS = 1 // posix_opt.h:66:1:
- X_XOPEN_SHM = 1 // posix_opt.h:69:1:
- X_XOPEN_UNIX = 1 // unistd.h:108:1:
- X_XOPEN_VERSION = 700 // unistd.h:90:1:
- X_XOPEN_XCU_VERSION = 4 // unistd.h:100:1:
- X_XOPEN_XPG2 = 1 // unistd.h:103:1:
- X_XOPEN_XPG3 = 1 // unistd.h:104:1:
- X_XOPEN_XPG4 = 1 // unistd.h:105:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ F_LOCK = 1 // unistd.h:1109:1:
+ F_OK = 0 // unistd.h:284:1:
+ F_TEST = 3 // unistd.h:1111:1:
+ F_TLOCK = 2 // unistd.h:1110:1:
+ F_ULOCK = 0 // unistd.h:1108:1:
+ L_INCR = 1 // unistd.h:328:1:
+ L_SET = 0 // unistd.h:327:1:
+ L_XTND = 2 // unistd.h:329:1:
+ R_OK = 4 // unistd.h:281:1:
+ SEEK_CUR = 1 // unistd.h:317:1:
+ SEEK_END = 2 // unistd.h:318:1:
+ SEEK_SET = 0 // unistd.h:316:1:
+ STDERR_FILENO = 2 // unistd.h:212:1:
+ STDIN_FILENO = 0 // unistd.h:210:1:
+ STDOUT_FILENO = 1 // unistd.h:211:1:
+ W_OK = 2 // unistd.h:282:1:
+ X_OK = 1 // unistd.h:283:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_POSIX_OPT_H = 1 // posix_opt.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:193:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:196:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:200:1:
+ X_GETOPT_CORE_H = 1 // getopt_core.h:21:1:
+ X_GETOPT_POSIX_H = 1 // getopt_posix.h:21:1:
+ X_LFS64_ASYNCHRONOUS_IO = 1 // posix_opt.h:117:1:
+ X_LFS64_LARGEFILE = 1 // posix_opt.h:121:1:
+ X_LFS64_STDIO = 1 // posix_opt.h:122:1:
+ X_LFS_ASYNCHRONOUS_IO = 1 // posix_opt.h:112:1:
+ X_LFS_LARGEFILE = 1 // posix_opt.h:120:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX2_CHAR_TERM = 200809 // posix_opt.h:179:1:
+ X_POSIX2_C_BIND = 200809 // unistd.h:74:1:
+ X_POSIX2_C_DEV = 200809 // unistd.h:78:1:
+ X_POSIX2_C_VERSION = 200809 // unistd.h:70:1:
+ X_POSIX2_LOCALEDEF = 200809 // unistd.h:86:1:
+ X_POSIX2_SW_DEV = 200809 // unistd.h:82:1:
+ X_POSIX2_VERSION = 200809 // unistd.h:67:1:
+ X_POSIX_ADVISORY_INFO = 200809 // posix_opt.h:170:1:
+ X_POSIX_ASYNCHRONOUS_IO = 200809 // posix_opt.h:109:1:
+ X_POSIX_ASYNC_IO = 1 // posix_opt.h:110:1:
+ X_POSIX_BARRIERS = 200809 // posix_opt.h:155:1:
+ X_POSIX_CHOWN_RESTRICTED = 0 // posix_opt.h:53:1:
+ X_POSIX_CLOCK_SELECTION = 200809 // posix_opt.h:167:1:
+ X_POSIX_CPUTIME = 0 // posix_opt.h:128:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_FSYNC = 200809 // posix_opt.h:38:1:
+ X_POSIX_IPV6 = 200809 // posix_opt.h:173:1:
+ X_POSIX_JOB_CONTROL = 1 // posix_opt.h:23:1:
+ X_POSIX_MAPPED_FILES = 200809 // posix_opt.h:41:1:
+ X_POSIX_MEMLOCK = 200809 // posix_opt.h:44:1:
+ X_POSIX_MEMLOCK_RANGE = 200809 // posix_opt.h:47:1:
+ X_POSIX_MEMORY_PROTECTION = 200809 // posix_opt.h:50:1:
+ X_POSIX_MESSAGE_PASSING = 200809 // posix_opt.h:158:1:
+ X_POSIX_MONOTONIC_CLOCK = 0 // posix_opt.h:164:1:
+ X_POSIX_NO_TRUNC = 1 // posix_opt.h:60:1:
+ X_POSIX_PRIORITIZED_IO = 200809 // posix_opt.h:114:1:
+ X_POSIX_PRIORITY_SCHEDULING = 200809 // posix_opt.h:32:1:
+ X_POSIX_RAW_SOCKETS = 200809 // posix_opt.h:176:1:
+ X_POSIX_READER_WRITER_LOCKS = 200809 // posix_opt.h:137:1:
+ X_POSIX_REALTIME_SIGNALS = 200809 // posix_opt.h:106:1:
+ X_POSIX_REENTRANT_FUNCTIONS = 1 // posix_opt.h:75:1:
+ X_POSIX_REGEXP = 1 // posix_opt.h:134:1:
+ X_POSIX_SAVED_IDS = 1 // posix_opt.h:26:1:
+ X_POSIX_SEMAPHORES = 200809 // posix_opt.h:103:1:
+ X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // posix_opt.h:125:1:
+ X_POSIX_SHELL = 1 // posix_opt.h:140:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_POSIX_SPAWN = 200809 // posix_opt.h:149:1:
+ X_POSIX_SPIN_LOCKS = 200809 // posix_opt.h:146:1:
+ X_POSIX_SPORADIC_SERVER = -1 // posix_opt.h:182:1:
+ X_POSIX_SYNCHRONIZED_IO = 200809 // posix_opt.h:35:1:
+ X_POSIX_THREADS = 200809 // posix_opt.h:72:1:
+ X_POSIX_THREAD_ATTR_STACKADDR = 200809 // posix_opt.h:85:1:
+ X_POSIX_THREAD_ATTR_STACKSIZE = 200809 // posix_opt.h:82:1:
+ X_POSIX_THREAD_CPUTIME = 0 // posix_opt.h:131:1:
+ X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 // posix_opt.h:79:1:
+ X_POSIX_THREAD_PRIO_INHERIT = 200809 // posix_opt.h:88:1:
+ X_POSIX_THREAD_PRIO_PROTECT = 200809 // posix_opt.h:92:1:
+ X_POSIX_THREAD_PROCESS_SHARED = 200809 // posix_opt.h:161:1:
+ X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 // posix_opt.h:96:1:
+ X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // posix_opt.h:99:1:
+ X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 // posix_opt.h:76:1:
+ X_POSIX_THREAD_SPORADIC_SERVER = -1 // posix_opt.h:183:1:
+ X_POSIX_TIMEOUTS = 200809 // posix_opt.h:143:1:
+ X_POSIX_TIMERS = 200809 // posix_opt.h:152:1:
+ X_POSIX_TRACE = -1 // posix_opt.h:186:1:
+ X_POSIX_TRACE_EVENT_FILTER = -1 // posix_opt.h:187:1:
+ X_POSIX_TRACE_INHERIT = -1 // posix_opt.h:188:1:
+ X_POSIX_TRACE_LOG = -1 // posix_opt.h:189:1:
+ X_POSIX_TYPED_MEMORY_OBJECTS = -1 // posix_opt.h:192:1:
+ X_POSIX_V6_ILP32_OFF32 = -1 // environments.h:47:1:
+ X_POSIX_V6_ILP32_OFFBIG = -1 // environments.h:48:1:
+ X_POSIX_V6_LP64_OFF64 = 1 // environments.h:59:1:
+ X_POSIX_V6_LPBIG_OFFBIG = -1 // environments.h:54:1:
+ X_POSIX_V7_ILP32_OFF32 = -1 // environments.h:45:1:
+ X_POSIX_V7_ILP32_OFFBIG = -1 // environments.h:46:1:
+ X_POSIX_V7_LP64_OFF64 = 1 // environments.h:58:1:
+ X_POSIX_V7_LPBIG_OFFBIG = -1 // environments.h:53:1:
+ X_POSIX_VDISABLE = 0 // posix_opt.h:57:1:
+ X_POSIX_VERSION = 200809 // unistd.h:34:1:
+ X_SIZET_ = 0 // stddef.h:201:1:
+ X_SIZE_T = 0 // stddef.h:187:1:
+ X_SIZE_T_ = 0 // stddef.h:192:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:197:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:195:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:194:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:188:1:
+ X_T_SIZE = 0 // stddef.h:190:1:
+ X_T_SIZE_ = 0 // stddef.h:189:1:
+ X_UNISTD_H = 1 // unistd.h:23:1:
+ X_XBS5_ILP32_OFF32 = -1 // environments.h:49:1:
+ X_XBS5_ILP32_OFFBIG = -1 // environments.h:50:1:
+ X_XBS5_LP64_OFF64 = 1 // environments.h:60:1:
+ X_XBS5_LPBIG_OFFBIG = -1 // environments.h:55:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:112:1:
+ X_XOPEN_LEGACY = 1 // unistd.h:115:1:
+ X_XOPEN_REALTIME = 1 // posix_opt.h:63:1:
+ X_XOPEN_REALTIME_THREADS = 1 // posix_opt.h:66:1:
+ X_XOPEN_SHM = 1 // posix_opt.h:69:1:
+ X_XOPEN_UNIX = 1 // unistd.h:108:1:
+ X_XOPEN_VERSION = 700 // unistd.h:90:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:100:1:
+ X_XOPEN_XPG2 = 1 // unistd.h:103:1:
+ X_XOPEN_XPG3 = 1 // unistd.h:104:1:
+ X_XOPEN_XPG4 = 1 // unistd.h:105:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
// the `_SC_*' symbols for the NAME argument to `sysconf';
// and the `_CS_*' symbols for the NAME argument to `confstr'.
// `sysconf', `pathconf', and `confstr' NAME values. Generic version.
-// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// Copyright (C) 1993-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -193,7 +210,7 @@ const ( /* confname.h:24:1: */
)
// Values for the NAME argument to `confstr'.
-const ( /* confname.h:533:1: */
+const ( /* confname.h:539:1: */
X_CS_PATH = 0 // The default search path.
X_CS_V6_WIDTH_RESTRICTED_ENVS = 1
@@ -512,6 +529,10 @@ const ( /* confname.h:71:1: */
X_SC_THREAD_ROBUST_PRIO_INHERIT = 247
X_SC_THREAD_ROBUST_PRIO_PROTECT = 248
+
+ X_SC_MINSIGSTKSZ = 249
+
+ X_SC_SIGSTKSZ = 250
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -532,7 +553,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -551,7 +572,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 2.10 Symbolic Constants <unistd.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -583,6 +604,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -598,12 +621,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -644,6 +670,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -714,6 +742,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -732,9 +816,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -762,7 +852,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -783,23 +874,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -812,6 +904,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -832,8 +926,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -843,6 +937,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -871,8 +968,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -903,11 +1005,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -917,11 +1022,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -955,6 +1076,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -968,6 +1105,23 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
@@ -1097,7 +1251,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// Define POSIX options for Linux.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1158,12 +1312,12 @@ type X__float128 = float64 /* <builtin>:47:21 */
// We support user-defined stacks.
-// We support priority inheritence.
+// We support priority inheritance.
// We support priority protection, though only for non-robust
// mutexes.
-// We support priority inheritence for robust mutexes.
+// We support priority inheritance for robust mutexes.
// We do not support priority protection for robust mutexes.
@@ -1224,7 +1378,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Typed memory objects are not available.
// Get the environment definitions from Unix98.
-// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1241,9 +1395,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
-
-// Both x86-64 and x32 use the 64-bit system call interface.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
// This header should define the following symbols under the described
// situations. A value `1' means that the model is always supported,
@@ -1262,16 +1429,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// used in previous versions of the Unix standard and are available
// only for compatibility.
-// Environments with 32-bit wide pointers are optionally provided.
-// Therefore following macros aren't defined:
-// # undef _POSIX_V7_ILP32_OFF32
-// # undef _POSIX_V7_ILP32_OFFBIG
-// # undef _POSIX_V6_ILP32_OFF32
-// # undef _POSIX_V6_ILP32_OFFBIG
-// # undef _XBS5_ILP32_OFF32
-// # undef _XBS5_ILP32_OFFBIG
-// and users need to check at runtime.
-
+// We can never provide environments with 32-bit wide pointers.
// We also have no use (for now) for an environment with bigger pointers
// and offsets.
@@ -1282,7 +1440,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// All functions that are not declared anywhere else.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1301,7 +1459,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1318,11 +1476,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1339,7 +1511,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -1358,14 +1530,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -1405,8 +1577,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1420,14 +1592,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -1438,10 +1608,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -1468,7 +1640,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -1480,66 +1652,67 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
-type Ssize_t = X__ssize_t /* unistd.h:220:19 */
+type Ssize_t = int64 /* unistd.h:220:19 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -1554,25 +1727,25 @@ type Ssize_t = X__ssize_t /* unistd.h:220:19 */
// The Single Unix specification says that some more types are
//
// available here.
-type Gid_t = X__gid_t /* unistd.h:232:17 */
+type Gid_t = uint32 /* unistd.h:232:17 */
-type Uid_t = X__uid_t /* unistd.h:237:17 */
+type Uid_t = uint32 /* unistd.h:237:17 */
-type Off_t = X__off64_t /* unistd.h:245:19 */
+type Off_t = int64 /* unistd.h:245:19 */
-type Useconds_t = X__useconds_t /* unistd.h:255:22 */
+type Useconds_t = uint32 /* unistd.h:255:22 */
-type Pid_t = X__pid_t /* unistd.h:260:17 */
+type Pid_t = int32 /* unistd.h:260:17 */
-type Intptr_t = X__intptr_t /* unistd.h:267:20 */
+type Intptr_t = int64 /* unistd.h:267:20 */
-type Socklen_t = X__socklen_t /* unistd.h:274:21 */
+type Socklen_t = uint32 /* unistd.h:274:21 */
// Define some macros helping to catch buffer overflows.
// System-specific extensions.
// System-specific extensions of <unistd.h>, Linux version.
-// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// Copyright (C) 2019-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_mips64le.go b/vendor/modernc.org/libc/unistd/unistd_linux_mips64le.go
new file mode 100644
index 000000000..7a83d48f3
--- /dev/null
+++ b/vendor/modernc.org/libc/unistd/unistd_linux_mips64le.go
@@ -0,0 +1,1592 @@
+// 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_linux_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 (
+ F_LOCK = 1 // unistd.h:1074:1:
+ F_OK = 0 // unistd.h:284:1:
+ F_TEST = 3 // unistd.h:1076:1:
+ F_TLOCK = 2 // unistd.h:1075:1:
+ F_ULOCK = 0 // unistd.h:1073:1:
+ L_INCR = 1 // unistd.h:323:1:
+ L_SET = 0 // unistd.h:322:1:
+ L_XTND = 2 // unistd.h:324:1:
+ R_OK = 4 // unistd.h:281:1:
+ SEEK_CUR = 1 // unistd.h:312:1:
+ SEEK_END = 2 // unistd.h:313:1:
+ SEEK_SET = 0 // unistd.h:311:1:
+ STDERR_FILENO = 2 // unistd.h:212:1:
+ STDIN_FILENO = 0 // unistd.h:210:1:
+ STDOUT_FILENO = 1 // unistd.h:211:1:
+ W_OK = 2 // unistd.h:282:1:
+ X_OK = 1 // unistd.h:283:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_POSIX_OPT_H = 1 // posix_opt.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_GETOPT_CORE_H = 1 // getopt_core.h:21:1:
+ X_GETOPT_POSIX_H = 1 // getopt_posix.h:21:1:
+ X_LFS64_ASYNCHRONOUS_IO = 1 // posix_opt.h:117:1:
+ X_LFS64_LARGEFILE = 1 // posix_opt.h:121:1:
+ X_LFS64_STDIO = 1 // posix_opt.h:122:1:
+ X_LFS_ASYNCHRONOUS_IO = 1 // posix_opt.h:112:1:
+ X_LFS_LARGEFILE = 1 // posix_opt.h:120:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX2_CHAR_TERM = 200809 // posix_opt.h:179:1:
+ X_POSIX2_C_BIND = 200809 // unistd.h:74:1:
+ X_POSIX2_C_DEV = 200809 // unistd.h:78:1:
+ X_POSIX2_C_VERSION = 200809 // unistd.h:70:1:
+ X_POSIX2_LOCALEDEF = 200809 // unistd.h:86:1:
+ X_POSIX2_SW_DEV = 200809 // unistd.h:82:1:
+ X_POSIX2_VERSION = 200809 // unistd.h:67:1:
+ X_POSIX_ADVISORY_INFO = 200809 // posix_opt.h:170:1:
+ X_POSIX_ASYNCHRONOUS_IO = 200809 // posix_opt.h:109:1:
+ X_POSIX_ASYNC_IO = 1 // posix_opt.h:110:1:
+ X_POSIX_BARRIERS = 200809 // posix_opt.h:155:1:
+ X_POSIX_CHOWN_RESTRICTED = 0 // posix_opt.h:53:1:
+ X_POSIX_CLOCK_SELECTION = 200809 // posix_opt.h:167:1:
+ X_POSIX_CPUTIME = 0 // posix_opt.h:128:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_FSYNC = 200809 // posix_opt.h:38:1:
+ X_POSIX_IPV6 = 200809 // posix_opt.h:173:1:
+ X_POSIX_JOB_CONTROL = 1 // posix_opt.h:23:1:
+ X_POSIX_MAPPED_FILES = 200809 // posix_opt.h:41:1:
+ X_POSIX_MEMLOCK = 200809 // posix_opt.h:44:1:
+ X_POSIX_MEMLOCK_RANGE = 200809 // posix_opt.h:47:1:
+ X_POSIX_MEMORY_PROTECTION = 200809 // posix_opt.h:50:1:
+ X_POSIX_MESSAGE_PASSING = 200809 // posix_opt.h:158:1:
+ X_POSIX_MONOTONIC_CLOCK = 0 // posix_opt.h:164:1:
+ X_POSIX_NO_TRUNC = 1 // posix_opt.h:60:1:
+ X_POSIX_PRIORITIZED_IO = 200809 // posix_opt.h:114:1:
+ X_POSIX_PRIORITY_SCHEDULING = 200809 // posix_opt.h:32:1:
+ X_POSIX_RAW_SOCKETS = 200809 // posix_opt.h:176:1:
+ X_POSIX_READER_WRITER_LOCKS = 200809 // posix_opt.h:137:1:
+ X_POSIX_REALTIME_SIGNALS = 200809 // posix_opt.h:106:1:
+ X_POSIX_REENTRANT_FUNCTIONS = 1 // posix_opt.h:75:1:
+ X_POSIX_REGEXP = 1 // posix_opt.h:134:1:
+ X_POSIX_SAVED_IDS = 1 // posix_opt.h:26:1:
+ X_POSIX_SEMAPHORES = 200809 // posix_opt.h:103:1:
+ X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // posix_opt.h:125:1:
+ X_POSIX_SHELL = 1 // posix_opt.h:140:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_POSIX_SPAWN = 200809 // posix_opt.h:149:1:
+ X_POSIX_SPIN_LOCKS = 200809 // posix_opt.h:146:1:
+ X_POSIX_SPORADIC_SERVER = -1 // posix_opt.h:182:1:
+ X_POSIX_SYNCHRONIZED_IO = 200809 // posix_opt.h:35:1:
+ X_POSIX_THREADS = 200809 // posix_opt.h:72:1:
+ X_POSIX_THREAD_ATTR_STACKADDR = 200809 // posix_opt.h:85:1:
+ X_POSIX_THREAD_ATTR_STACKSIZE = 200809 // posix_opt.h:82:1:
+ X_POSIX_THREAD_CPUTIME = 0 // posix_opt.h:131:1:
+ X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 // posix_opt.h:79:1:
+ X_POSIX_THREAD_PRIO_INHERIT = 200809 // posix_opt.h:88:1:
+ X_POSIX_THREAD_PRIO_PROTECT = 200809 // posix_opt.h:92:1:
+ X_POSIX_THREAD_PROCESS_SHARED = 200809 // posix_opt.h:161:1:
+ X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 // posix_opt.h:96:1:
+ X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // posix_opt.h:99:1:
+ X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 // posix_opt.h:76:1:
+ X_POSIX_THREAD_SPORADIC_SERVER = -1 // posix_opt.h:183:1:
+ X_POSIX_TIMEOUTS = 200809 // posix_opt.h:143:1:
+ X_POSIX_TIMERS = 200809 // posix_opt.h:152:1:
+ X_POSIX_TRACE = -1 // posix_opt.h:186:1:
+ X_POSIX_TRACE_EVENT_FILTER = -1 // posix_opt.h:187:1:
+ X_POSIX_TRACE_INHERIT = -1 // posix_opt.h:188:1:
+ X_POSIX_TRACE_LOG = -1 // posix_opt.h:189:1:
+ X_POSIX_TYPED_MEMORY_OBJECTS = -1 // posix_opt.h:192:1:
+ X_POSIX_V6_LP64_OFF64 = 1 // environments.h:62:1:
+ X_POSIX_V6_LPBIG_OFFBIG = -1 // environments.h:57:1:
+ X_POSIX_V7_LP64_OFF64 = 1 // environments.h:61:1:
+ X_POSIX_V7_LPBIG_OFFBIG = -1 // environments.h:56:1:
+ X_POSIX_VDISABLE = 0 // posix_opt.h:57:1:
+ X_POSIX_VERSION = 200809 // unistd.h:34:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ X_UNISTD_H = 1 // unistd.h:23:1:
+ X_XBS5_LP64_OFF64 = 1 // environments.h:63:1:
+ X_XBS5_LPBIG_OFFBIG = -1 // environments.h:58:1:
+ X_XOPEN_ENH_I18N = 1 // unistd.h:112:1:
+ X_XOPEN_LEGACY = 1 // unistd.h:115:1:
+ X_XOPEN_REALTIME = 1 // posix_opt.h:63:1:
+ X_XOPEN_REALTIME_THREADS = 1 // posix_opt.h:66:1:
+ X_XOPEN_SHM = 1 // posix_opt.h:69:1:
+ X_XOPEN_UNIX = 1 // unistd.h:108:1:
+ X_XOPEN_VERSION = 700 // unistd.h:90:1:
+ X_XOPEN_XCU_VERSION = 4 // unistd.h:100:1:
+ X_XOPEN_XPG2 = 1 // unistd.h:103:1:
+ X_XOPEN_XPG3 = 1 // unistd.h:104:1:
+ X_XOPEN_XPG4 = 1 // unistd.h:105:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
+// the `_SC_*' symbols for the NAME argument to `sysconf';
+// and the `_CS_*' symbols for the NAME argument to `confstr'.
+// `sysconf', `pathconf', and `confstr' NAME values. Generic version.
+// Copyright (C) 1993-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Values for the NAME argument to `pathconf' and `fpathconf'.
+const ( /* confname.h:24:1: */
+ X_PC_LINK_MAX = 0
+ X_PC_MAX_CANON = 1
+ X_PC_MAX_INPUT = 2
+ X_PC_NAME_MAX = 3
+ X_PC_PATH_MAX = 4
+ X_PC_PIPE_BUF = 5
+ X_PC_CHOWN_RESTRICTED = 6
+ X_PC_NO_TRUNC = 7
+ X_PC_VDISABLE = 8
+ X_PC_SYNC_IO = 9
+ X_PC_ASYNC_IO = 10
+ X_PC_PRIO_IO = 11
+ X_PC_SOCK_MAXBUF = 12
+ X_PC_FILESIZEBITS = 13
+ X_PC_REC_INCR_XFER_SIZE = 14
+ X_PC_REC_MAX_XFER_SIZE = 15
+ X_PC_REC_MIN_XFER_SIZE = 16
+ X_PC_REC_XFER_ALIGN = 17
+ X_PC_ALLOC_SIZE_MIN = 18
+ X_PC_SYMLINK_MAX = 19
+ X_PC_2_SYMLINKS = 20
+)
+
+// Values for the NAME argument to `confstr'.
+const ( /* confname.h:533:1: */
+ X_CS_PATH = 0 // The default search path.
+
+ X_CS_V6_WIDTH_RESTRICTED_ENVS = 1
+
+ X_CS_GNU_LIBC_VERSION = 2
+ X_CS_GNU_LIBPTHREAD_VERSION = 3
+
+ X_CS_V5_WIDTH_RESTRICTED_ENVS = 4
+
+ X_CS_V7_WIDTH_RESTRICTED_ENVS = 5
+
+ X_CS_LFS_CFLAGS = 1000
+ X_CS_LFS_LDFLAGS = 1001
+ X_CS_LFS_LIBS = 1002
+ X_CS_LFS_LINTFLAGS = 1003
+ X_CS_LFS64_CFLAGS = 1004
+ X_CS_LFS64_LDFLAGS = 1005
+ X_CS_LFS64_LIBS = 1006
+ X_CS_LFS64_LINTFLAGS = 1007
+
+ X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100
+ X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101
+ X_CS_XBS5_ILP32_OFF32_LIBS = 1102
+ X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103
+ X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104
+ X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105
+ X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106
+ X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107
+ X_CS_XBS5_LP64_OFF64_CFLAGS = 1108
+ X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109
+ X_CS_XBS5_LP64_OFF64_LIBS = 1110
+ X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111
+ X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112
+ X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113
+ X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114
+ X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115
+
+ X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116
+ X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117
+ X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118
+ X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119
+ X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120
+ X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121
+ X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122
+ X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
+ X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124
+ X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125
+ X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126
+ X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127
+ X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130
+ X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
+
+ X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132
+ X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133
+ X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134
+ X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135
+ X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136
+ X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137
+ X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138
+ X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
+ X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140
+ X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141
+ X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142
+ X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143
+ X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144
+ X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145
+ X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146
+ X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
+
+ X_CS_V6_ENV = 1148
+ X_CS_V7_ENV = 1149
+)
+
+// Values for the argument to `sysconf'.
+const ( /* confname.h:71:1: */
+ X_SC_ARG_MAX = 0
+ X_SC_CHILD_MAX = 1
+ X_SC_CLK_TCK = 2
+ X_SC_NGROUPS_MAX = 3
+ X_SC_OPEN_MAX = 4
+ X_SC_STREAM_MAX = 5
+ X_SC_TZNAME_MAX = 6
+ X_SC_JOB_CONTROL = 7
+ X_SC_SAVED_IDS = 8
+ X_SC_REALTIME_SIGNALS = 9
+ X_SC_PRIORITY_SCHEDULING = 10
+ X_SC_TIMERS = 11
+ X_SC_ASYNCHRONOUS_IO = 12
+ X_SC_PRIORITIZED_IO = 13
+ X_SC_SYNCHRONIZED_IO = 14
+ X_SC_FSYNC = 15
+ X_SC_MAPPED_FILES = 16
+ X_SC_MEMLOCK = 17
+ X_SC_MEMLOCK_RANGE = 18
+ X_SC_MEMORY_PROTECTION = 19
+ X_SC_MESSAGE_PASSING = 20
+ X_SC_SEMAPHORES = 21
+ X_SC_SHARED_MEMORY_OBJECTS = 22
+ X_SC_AIO_LISTIO_MAX = 23
+ X_SC_AIO_MAX = 24
+ X_SC_AIO_PRIO_DELTA_MAX = 25
+ X_SC_DELAYTIMER_MAX = 26
+ X_SC_MQ_OPEN_MAX = 27
+ X_SC_MQ_PRIO_MAX = 28
+ X_SC_VERSION = 29
+ X_SC_PAGESIZE = 30
+ X_SC_RTSIG_MAX = 31
+ X_SC_SEM_NSEMS_MAX = 32
+ X_SC_SEM_VALUE_MAX = 33
+ X_SC_SIGQUEUE_MAX = 34
+ X_SC_TIMER_MAX = 35
+
+ // Values for the argument to `sysconf'
+ // corresponding to _POSIX2_* symbols.
+ X_SC_BC_BASE_MAX = 36
+ X_SC_BC_DIM_MAX = 37
+ X_SC_BC_SCALE_MAX = 38
+ X_SC_BC_STRING_MAX = 39
+ X_SC_COLL_WEIGHTS_MAX = 40
+ X_SC_EQUIV_CLASS_MAX = 41
+ X_SC_EXPR_NEST_MAX = 42
+ X_SC_LINE_MAX = 43
+ X_SC_RE_DUP_MAX = 44
+ X_SC_CHARCLASS_NAME_MAX = 45
+
+ X_SC_2_VERSION = 46
+ X_SC_2_C_BIND = 47
+ X_SC_2_C_DEV = 48
+ X_SC_2_FORT_DEV = 49
+ X_SC_2_FORT_RUN = 50
+ X_SC_2_SW_DEV = 51
+ X_SC_2_LOCALEDEF = 52
+
+ X_SC_PII = 53
+ X_SC_PII_XTI = 54
+ X_SC_PII_SOCKET = 55
+ X_SC_PII_INTERNET = 56
+ X_SC_PII_OSI = 57
+ X_SC_POLL = 58
+ X_SC_SELECT = 59
+ X_SC_UIO_MAXIOV = 60
+ X_SC_IOV_MAX = 60
+ X_SC_PII_INTERNET_STREAM = 61
+ X_SC_PII_INTERNET_DGRAM = 62
+ X_SC_PII_OSI_COTS = 63
+ X_SC_PII_OSI_CLTS = 64
+ X_SC_PII_OSI_M = 65
+ X_SC_T_IOV_MAX = 66
+
+ // Values according to POSIX 1003.1c (POSIX threads).
+ X_SC_THREADS = 67
+ X_SC_THREAD_SAFE_FUNCTIONS = 68
+ X_SC_GETGR_R_SIZE_MAX = 69
+ X_SC_GETPW_R_SIZE_MAX = 70
+ X_SC_LOGIN_NAME_MAX = 71
+ X_SC_TTY_NAME_MAX = 72
+ X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73
+ X_SC_THREAD_KEYS_MAX = 74
+ X_SC_THREAD_STACK_MIN = 75
+ X_SC_THREAD_THREADS_MAX = 76
+ X_SC_THREAD_ATTR_STACKADDR = 77
+ X_SC_THREAD_ATTR_STACKSIZE = 78
+ X_SC_THREAD_PRIORITY_SCHEDULING = 79
+ X_SC_THREAD_PRIO_INHERIT = 80
+ X_SC_THREAD_PRIO_PROTECT = 81
+ X_SC_THREAD_PROCESS_SHARED = 82
+
+ X_SC_NPROCESSORS_CONF = 83
+ X_SC_NPROCESSORS_ONLN = 84
+ X_SC_PHYS_PAGES = 85
+ X_SC_AVPHYS_PAGES = 86
+ X_SC_ATEXIT_MAX = 87
+ X_SC_PASS_MAX = 88
+
+ X_SC_XOPEN_VERSION = 89
+ X_SC_XOPEN_XCU_VERSION = 90
+ X_SC_XOPEN_UNIX = 91
+ X_SC_XOPEN_CRYPT = 92
+ X_SC_XOPEN_ENH_I18N = 93
+ X_SC_XOPEN_SHM = 94
+
+ X_SC_2_CHAR_TERM = 95
+ X_SC_2_C_VERSION = 96
+ X_SC_2_UPE = 97
+
+ X_SC_XOPEN_XPG2 = 98
+ X_SC_XOPEN_XPG3 = 99
+ X_SC_XOPEN_XPG4 = 100
+
+ X_SC_CHAR_BIT = 101
+ X_SC_CHAR_MAX = 102
+ X_SC_CHAR_MIN = 103
+ X_SC_INT_MAX = 104
+ X_SC_INT_MIN = 105
+ X_SC_LONG_BIT = 106
+ X_SC_WORD_BIT = 107
+ X_SC_MB_LEN_MAX = 108
+ X_SC_NZERO = 109
+ X_SC_SSIZE_MAX = 110
+ X_SC_SCHAR_MAX = 111
+ X_SC_SCHAR_MIN = 112
+ X_SC_SHRT_MAX = 113
+ X_SC_SHRT_MIN = 114
+ X_SC_UCHAR_MAX = 115
+ X_SC_UINT_MAX = 116
+ X_SC_ULONG_MAX = 117
+ X_SC_USHRT_MAX = 118
+
+ X_SC_NL_ARGMAX = 119
+ X_SC_NL_LANGMAX = 120
+ X_SC_NL_MSGMAX = 121
+ X_SC_NL_NMAX = 122
+ X_SC_NL_SETMAX = 123
+ X_SC_NL_TEXTMAX = 124
+
+ X_SC_XBS5_ILP32_OFF32 = 125
+ X_SC_XBS5_ILP32_OFFBIG = 126
+ X_SC_XBS5_LP64_OFF64 = 127
+ X_SC_XBS5_LPBIG_OFFBIG = 128
+
+ X_SC_XOPEN_LEGACY = 129
+ X_SC_XOPEN_REALTIME = 130
+ X_SC_XOPEN_REALTIME_THREADS = 131
+
+ X_SC_ADVISORY_INFO = 132
+ X_SC_BARRIERS = 133
+ X_SC_BASE = 134
+ X_SC_C_LANG_SUPPORT = 135
+ X_SC_C_LANG_SUPPORT_R = 136
+ X_SC_CLOCK_SELECTION = 137
+ X_SC_CPUTIME = 138
+ X_SC_THREAD_CPUTIME = 139
+ X_SC_DEVICE_IO = 140
+ X_SC_DEVICE_SPECIFIC = 141
+ X_SC_DEVICE_SPECIFIC_R = 142
+ X_SC_FD_MGMT = 143
+ X_SC_FIFO = 144
+ X_SC_PIPE = 145
+ X_SC_FILE_ATTRIBUTES = 146
+ X_SC_FILE_LOCKING = 147
+ X_SC_FILE_SYSTEM = 148
+ X_SC_MONOTONIC_CLOCK = 149
+ X_SC_MULTI_PROCESS = 150
+ X_SC_SINGLE_PROCESS = 151
+ X_SC_NETWORKING = 152
+ X_SC_READER_WRITER_LOCKS = 153
+ X_SC_SPIN_LOCKS = 154
+ X_SC_REGEXP = 155
+ X_SC_REGEX_VERSION = 156
+ X_SC_SHELL = 157
+ X_SC_SIGNALS = 158
+ X_SC_SPAWN = 159
+ X_SC_SPORADIC_SERVER = 160
+ X_SC_THREAD_SPORADIC_SERVER = 161
+ X_SC_SYSTEM_DATABASE = 162
+ X_SC_SYSTEM_DATABASE_R = 163
+ X_SC_TIMEOUTS = 164
+ X_SC_TYPED_MEMORY_OBJECTS = 165
+ X_SC_USER_GROUPS = 166
+ X_SC_USER_GROUPS_R = 167
+ X_SC_2_PBS = 168
+ X_SC_2_PBS_ACCOUNTING = 169
+ X_SC_2_PBS_LOCATE = 170
+ X_SC_2_PBS_MESSAGE = 171
+ X_SC_2_PBS_TRACK = 172
+ X_SC_SYMLOOP_MAX = 173
+ X_SC_STREAMS = 174
+ X_SC_2_PBS_CHECKPOINT = 175
+
+ X_SC_V6_ILP32_OFF32 = 176
+ X_SC_V6_ILP32_OFFBIG = 177
+ X_SC_V6_LP64_OFF64 = 178
+ X_SC_V6_LPBIG_OFFBIG = 179
+
+ X_SC_HOST_NAME_MAX = 180
+ X_SC_TRACE = 181
+ X_SC_TRACE_EVENT_FILTER = 182
+ X_SC_TRACE_INHERIT = 183
+ X_SC_TRACE_LOG = 184
+
+ X_SC_LEVEL1_ICACHE_SIZE = 185
+ X_SC_LEVEL1_ICACHE_ASSOC = 186
+ X_SC_LEVEL1_ICACHE_LINESIZE = 187
+ X_SC_LEVEL1_DCACHE_SIZE = 188
+ X_SC_LEVEL1_DCACHE_ASSOC = 189
+ X_SC_LEVEL1_DCACHE_LINESIZE = 190
+ X_SC_LEVEL2_CACHE_SIZE = 191
+ X_SC_LEVEL2_CACHE_ASSOC = 192
+ X_SC_LEVEL2_CACHE_LINESIZE = 193
+ X_SC_LEVEL3_CACHE_SIZE = 194
+ X_SC_LEVEL3_CACHE_ASSOC = 195
+ X_SC_LEVEL3_CACHE_LINESIZE = 196
+ X_SC_LEVEL4_CACHE_SIZE = 197
+ X_SC_LEVEL4_CACHE_ASSOC = 198
+ X_SC_LEVEL4_CACHE_LINESIZE = 199
+ // Leave room here, maybe we need a few more cache levels some day.
+
+ X_SC_IPV6 = 235
+ X_SC_RAW_SOCKETS = 236
+
+ X_SC_V7_ILP32_OFF32 = 237
+ X_SC_V7_ILP32_OFFBIG = 238
+ X_SC_V7_LP64_OFF64 = 239
+ X_SC_V7_LPBIG_OFFBIG = 240
+
+ X_SC_SS_REPL_MAX = 241
+
+ X_SC_TRACE_EVENT_NAME_MAX = 242
+ X_SC_TRACE_NAME_MAX = 243
+ X_SC_TRACE_SYS_MAX = 244
+ X_SC_TRACE_USER_EVENT_MAX = 245
+
+ X_SC_XOPEN_STREAMS = 246
+
+ X_SC_THREAD_ROBUST_PRIO_INHERIT = 247
+ X_SC_THREAD_ROBUST_PRIO_PROTECT = 248
+)
+
+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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.10 Symbolic Constants <unistd.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// These may be used to determine what facilities are present at compile time.
+// Their values can be obtained at run time from `sysconf'.
+
+// POSIX Standard approved as ISO/IEC 9945-1 as of September 2008.
+
+// These are not #ifdef __USE_POSIX2 because they are
+// in the theoretically application-owned namespace.
+
+// The utilities on GNU systems also correspond to this version.
+
+// The utilities on GNU systems also correspond to this version.
+
+// This symbol was required until the 2001 edition of POSIX.
+
+// If defined, the implementation supports the
+// C Language Bindings Option.
+
+// If defined, the implementation supports the
+// C Language Development Utilities Option.
+
+// If defined, the implementation supports the
+// Software Development Utilities Option.
+
+// If defined, the implementation supports the
+// creation of locales with the localedef utility.
+
+// X/Open version number to which the library conforms. It is selectable.
+
+// Commands and utilities from XPG4 are available.
+
+// We are compatible with the old published standards as well.
+
+// The X/Open Unix extensions are available.
+
+// The enhanced internationalization capabilities according to XPG4.2
+// are present.
+
+// The legacy interfaces are also available.
+
+// Get values of POSIX options:
+//
+// If these symbols are defined, the corresponding features are
+// always available. If not, they may be available sometimes.
+// The current values can be obtained with `sysconf'.
+//
+// _POSIX_JOB_CONTROL Job control is supported.
+// _POSIX_SAVED_IDS Processes have a saved set-user-ID
+// and a saved set-group-ID.
+// _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported.
+// _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported.
+// _POSIX_TIMERS POSIX.4 clocks and timers are supported.
+// _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported.
+// _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported.
+// _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported.
+// _POSIX_FSYNC The fsync function is present.
+// _POSIX_MAPPED_FILES Mapping of files to memory is supported.
+// _POSIX_MEMLOCK Locking of all memory is supported.
+// _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported.
+// _POSIX_MEMORY_PROTECTION Setting of memory protections is supported.
+// _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported.
+// _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported.
+// _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported.
+// _POSIX_THREADS POSIX.1c pthreads are supported.
+// _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported.
+// _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported.
+// _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported.
+// _POSIX_THREAD_PRIORITY_SCHEDULING
+// POSIX.1c thread execution scheduling supported.
+// _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported.
+// _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported.
+// _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported.
+// _POSIX_PII Protocol-independent interfaces are supported.
+// _POSIX_PII_XTI XTI protocol-indep. interfaces are supported.
+// _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported.
+// _POSIX_PII_INTERNET Internet family of protocols supported.
+// _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported.
+// _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported.
+// _POSIX_PII_OSI ISO/OSI family of protocols supported.
+// _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported.
+// _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported.
+// _POSIX_POLL Implementation supports `poll' function.
+// _POSIX_SELECT Implementation supports `select' and `pselect'.
+//
+// _XOPEN_REALTIME X/Open realtime support is available.
+// _XOPEN_REALTIME_THREADS X/Open realtime thread support is available.
+// _XOPEN_SHM Shared memory interface according to XPG4.2.
+//
+// _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit
+// int, long, pointer, and off_t types.
+// _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit
+// int, long, and pointer and off_t with at least
+// 64 bits.
+// _XBS5_LP64_OFF64 Implementation provides environment with 32-bit
+// int, and 64-bit long, pointer, and off_t types.
+// _XBS5_LPBIG_OFFBIG Implementation provides environment with at
+// least 32 bits int and long, pointer, and off_t
+// with at least 64 bits.
+//
+// If any of these symbols is defined as -1, the corresponding option is not
+// true for any file. If any is defined as other than -1, the corresponding
+// option is true for all files. If a symbol is not defined at all, the value
+// for a specific file can be obtained from `pathconf' and `fpathconf'.
+//
+// _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change
+// the owner of a file. `chown' can only be used
+// to change the group ID of a file to a group of
+// which the calling process is a member.
+// _POSIX_NO_TRUNC Pathname components longer than
+// NAME_MAX generate an error.
+// _POSIX_VDISABLE If defined, if the value of an element of the
+// `c_cc' member of `struct termios' is
+// _POSIX_VDISABLE, no character will have the
+// effect associated with that element.
+// _POSIX_SYNC_IO Synchronous I/O may be performed.
+// _POSIX_ASYNC_IO Asynchronous I/O may be performed.
+// _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed.
+//
+// Support for the Large File Support interface is not generally available.
+// If it is available the following constants are defined to one.
+// _LFS64_LARGEFILE Low-level I/O supports large files.
+// _LFS64_STDIO Standard I/O supports large files.
+//
+
+// Define POSIX options for Linux.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 2.1 of the
+// License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; see the file COPYING.LIB. If
+// not, see <https://www.gnu.org/licenses/>.
+
+// Job control is supported.
+
+// Processes have a saved set-user-ID and a saved set-group-ID.
+
+// Priority scheduling is not supported with the correct semantics,
+// but GNU/Linux applications expect that the corresponding interfaces
+// are available, even though the semantics do not meet the POSIX
+// requirements. See glibc bug 14829.
+
+// Synchronizing file data is supported.
+
+// The fsync function is present.
+
+// Mapping of files to memory is supported.
+
+// Locking of all memory is supported.
+
+// Locking of ranges of memory is supported.
+
+// Setting of memory protections is supported.
+
+// Some filesystems allow all users to change file ownership.
+
+// `c_cc' member of 'struct termios' structure can be disabled by
+// using the value _POSIX_VDISABLE.
+
+// Filenames are not silently truncated.
+
+// X/Open realtime support is available.
+
+// X/Open thread realtime support is available.
+
+// XPG4.2 shared memory is supported.
+
+// Tell we have POSIX threads.
+
+// We have the reentrant functions described in POSIX.
+
+// We provide priority scheduling for threads.
+
+// We support user-defined stack sizes.
+
+// We support user-defined stacks.
+
+// We support priority inheritence.
+
+// We support priority protection, though only for non-robust
+// mutexes.
+
+// We support priority inheritence for robust mutexes.
+
+// We do not support priority protection for robust mutexes.
+
+// We support POSIX.1b semaphores.
+
+// Real-time signals are supported.
+
+// We support asynchronous I/O.
+// Alternative name for Unix98.
+// Support for prioritization is also available.
+
+// The LFS support in asynchronous I/O is also available.
+
+// The rest of the LFS is also available.
+
+// POSIX shared memory objects are implemented.
+
+// CPU-time clocks support needs to be checked at runtime.
+
+// Clock support in threads must be also checked at runtime.
+
+// GNU libc provides regular expression handling.
+
+// Reader/Writer locks are available.
+
+// We have a POSIX shell.
+
+// We support the Timeouts option.
+
+// We support spinlocks.
+
+// The `spawn' function family is supported.
+
+// We have POSIX timers.
+
+// The barrier functions are available.
+
+// POSIX message queues are available.
+
+// Thread process-shared synchronization is supported.
+
+// The monotonic clock might be available.
+
+// The clock selection interfaces are available.
+
+// Advisory information interfaces are available.
+
+// IPv6 support is available.
+
+// Raw socket support is available.
+
+// We have at least one terminal.
+
+// Neither process nor thread sporadic server interfaces is available.
+
+// trace.h is not available.
+
+// Typed memory objects are not available.
+
+// Get the environment definitions from Unix98.
+// Copyright (C) 1999-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// This header should define the following symbols under the described
+// situations. A value `1' means that the model is always supported,
+// `-1' means it is never supported. Undefined means it cannot be
+// statically decided.
+//
+// _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
+// _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
+//
+// _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
+// _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
+//
+// The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
+// _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
+// _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
+// used in previous versions of the Unix standard and are available
+// only for compatibility.
+
+// Environments with 32-bit wide pointers are optionally provided.
+// Therefore following macros aren't defined:
+// # undef _POSIX_V7_ILP32_OFF32
+// # undef _POSIX_V7_ILP32_OFFBIG
+// # undef _POSIX_V6_ILP32_OFF32
+// # undef _POSIX_V6_ILP32_OFFBIG
+// # undef _XBS5_ILP32_OFF32
+// # undef _XBS5_ILP32_OFFBIG
+// and users need to check at runtime.
+
+// We also have no use (for now) for an environment with bigger pointers
+// and offsets.
+
+// By default we have 64-bit wide `long int', pointers and `off_t'.
+
+// Standard file descriptors.
+
+// All functions that are not declared anywhere else.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type Ssize_t = X__ssize_t /* unistd.h:220:19 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// The Single Unix specification says that some more types are
+//
+// available here.
+type Gid_t = X__gid_t /* unistd.h:232:17 */
+
+type Uid_t = X__uid_t /* unistd.h:237:17 */
+
+type Off_t = X__off64_t /* unistd.h:245:19 */
+
+type Useconds_t = X__useconds_t /* unistd.h:255:22 */
+
+type Pid_t = X__pid_t /* unistd.h:260:17 */
+
+type Intptr_t = X__intptr_t /* unistd.h:267:20 */
+
+type Socklen_t = X__socklen_t /* unistd.h:274:21 */
+
+// Define some macros helping to catch buffer overflows.
+
+// System-specific extensions.
+// System-specific extensions of <unistd.h>, Linux version.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/utime/capi_illumos_amd64.go b/vendor/modernc.org/libc/utime/capi_illumos_amd64.go
new file mode 100644
index 000000000..754737fe0
--- /dev/null
+++ b/vendor/modernc.org/libc/utime/capi_illumos_amd64.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_illumos_amd64.go -pkgname utime', DO NOT EDIT.
+
+package utime
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/utime/capi_linux_loong64.go b/vendor/modernc.org/libc/utime/capi_linux_loong64.go
index 8f7c87f4d..82dc91604 100644
--- a/vendor/modernc.org/libc/utime/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/utime/capi_linux_loong64.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 -ignore-unsupported-alignment -o utime/utime_linux_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_linux_loong64.go -pkgname utime', DO NOT EDIT.
package utime
diff --git a/vendor/modernc.org/libc/utime/capi_linux_mips64le.go b/vendor/modernc.org/libc/utime/capi_linux_mips64le.go
new file mode 100644
index 000000000..8f7c87f4d
--- /dev/null
+++ b/vendor/modernc.org/libc/utime/capi_linux_mips64le.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_linux_amd64.go -pkgname utime', DO NOT EDIT.
+
+package utime
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/utime/utime_illumos_amd64.go b/vendor/modernc.org/libc/utime/utime_illumos_amd64.go
new file mode 100644
index 000000000..cc39bd195
--- /dev/null
+++ b/vendor/modernc.org/libc/utime/utime_illumos_amd64.go
@@ -0,0 +1,2801 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UTIME_H = 0 // utime.h:31:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_UTIME_H = 0 // utime.h:32:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// utimbuf is used by utime(2)
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 1997 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// utimbuf is used by utime(2)
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 1997 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// utimbuf is used by utime(2)
+type Utimbuf = struct {
+ Factime int64
+ Fmodtime int64
+} /* utime.h:40:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/utime/utime_linux_loong64.go b/vendor/modernc.org/libc/utime/utime_linux_loong64.go
index 9d673aca9..92694858e 100644
--- a/vendor/modernc.org/libc/utime/utime_linux_loong64.go
+++ b/vendor/modernc.org/libc/utime/utime_linux_loong64.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 -ignore-unsupported-alignment -o utime/utime_linux_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_linux_loong64.go -pkgname utime', DO NOT EDIT.
package utime
@@ -15,21 +15,32 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_UTIME_H = 1 // utime.h:23:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_UTIME_H = 1 // utime.h:23:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
type Ptrdiff_t = int64 /* <builtin>:3:26 */
@@ -50,7 +61,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -69,7 +80,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -101,6 +112,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -116,12 +129,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -162,6 +178,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -232,6 +250,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -250,9 +324,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -280,7 +360,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -301,23 +382,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -330,6 +412,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -350,8 +434,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -361,6 +445,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -389,8 +476,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -421,11 +513,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -435,11 +530,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -473,6 +584,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -486,13 +613,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -511,7 +655,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -528,11 +672,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -549,7 +707,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -568,14 +726,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -615,8 +773,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -630,14 +788,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -648,10 +804,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -678,7 +836,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -690,67 +848,68 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -770,12 +929,12 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */
// Never include this file directly; use <sys/types.h> instead.
// Returned by `time'.
-type Time_t = X__time_t /* time_t.h:7:18 */
+type Time_t = int64 /* time_t.h:10:18 */
// Structure describing file times.
type Utimbuf = struct {
- Factime X__time_t
- Fmodtime X__time_t
+ Factime int64
+ Fmodtime int64
} /* utime.h:36:1 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/utime/utime_linux_mips64le.go b/vendor/modernc.org/libc/utime/utime_linux_mips64le.go
new file mode 100644
index 000000000..9d673aca9
--- /dev/null
+++ b/vendor/modernc.org/libc/utime/utime_linux_mips64le.go
@@ -0,0 +1,781 @@
+// 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_linux_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_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_UTIME_H = 1 // utime.h:23:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177: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 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// Structure describing file times.
+type Utimbuf = struct {
+ Factime X__time_t
+ Fmodtime X__time_t
+} /* utime.h:36:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go b/vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go
new file mode 100644
index 000000000..1b9a094ea
--- /dev/null
+++ b/vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go
@@ -0,0 +1,5 @@
+// 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_illumos_amd64.go -pkgname uuid', DO NOT EDIT.
+
+package uuid
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_linux_mips64le.go b/vendor/modernc.org/libc/uuid/uuid/capi_linux_mips64le.go
new file mode 100644
index 000000000..68331799a
--- /dev/null
+++ b/vendor/modernc.org/libc/uuid/uuid/capi_linux_mips64le.go
@@ -0,0 +1,5 @@
+// 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_linux_amd64.go -pkgname uuid', DO NOT EDIT.
+
+package uuid
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go
new file mode 100644
index 000000000..8f48bbd78
--- /dev/null
+++ b/vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go
@@ -0,0 +1,2967 @@
+// 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_illumos_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 (
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ CLOCK_HIGHRES = 4 // time_impl.h:126:1:
+ CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
+ CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
+ CLOCK_PROF = 2 // time_impl.h:127:1:
+ CLOCK_REALTIME = 3 // time_impl.h:123:1:
+ CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
+ CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
+ DST_AUST = 2 // time.h:115:1:
+ DST_AUSTALT = 10 // time.h:123:1:
+ DST_CAN = 6 // time.h:119:1:
+ DST_EET = 5 // time.h:118:1:
+ DST_GB = 7 // time.h:120:1:
+ DST_MET = 4 // time.h:117:1:
+ DST_NONE = 0 // time.h:113:1:
+ DST_RUM = 8 // time.h:121:1:
+ DST_TUR = 9 // time.h:122:1:
+ DST_USA = 1 // time.h:114:1:
+ DST_WET = 3 // time.h:116:1:
+ FD_SETSIZE = 65536 // select.h:88:1:
+ ITIMER_PROF = 2 // time.h:201:1:
+ ITIMER_REAL = 0 // time.h:199:1:
+ ITIMER_REALPROF = 3 // time.h:204:1:
+ ITIMER_VIRTUAL = 1 // time.h:200:1:
+ MICROSEC = 1000000 // time.h:246:1:
+ MILLISEC = 1000 // time.h:245:1:
+ NANOSEC = 1000000000 // time.h:247:1:
+ NBBY = 8 // select.h:103:1:
+ P_MYID = -1 // types.h:632:1:
+ REG_LABEL_BP = 2 // machtypes.h:44:1:
+ REG_LABEL_MAX = 8 // machtypes.h:51:1:
+ REG_LABEL_PC = 0 // machtypes.h:42:1:
+ REG_LABEL_R12 = 4 // machtypes.h:47:1:
+ REG_LABEL_R13 = 5 // machtypes.h:48:1:
+ REG_LABEL_R14 = 6 // machtypes.h:49:1:
+ REG_LABEL_R15 = 7 // machtypes.h:50:1:
+ REG_LABEL_RBX = 3 // machtypes.h:46:1:
+ REG_LABEL_SP = 1 // machtypes.h:43:1:
+ SEC = 1 // time.h:244:1:
+ TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
+ TIMER_RELTIME = 0x0 // time_impl.h:133:1:
+ TIME_UTC = 0x1 // time.h:306:1:
+ UUID_LEN = 16 // uuid.h:77:1:
+ UUID_PRINTABLE_STRING_LENGTH = 37 // uuid.h:79:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCKID_T = 0 // types.h:568:1:
+ X_CLOCK_T = 0 // types.h:563:1:
+ X_COND_MAGIC = 0x4356 // types.h:426:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT64_TYPE = 0 // int_types.h:82:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IN_ADDR_T = 0 // byteorder.h:78:1:
+ X_IN_PORT_T = 0 // byteorder.h:73:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // time.h:291:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
+ X_NBBY = 8 // select.h:100:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // types.h:142:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // types.h:112:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_RWL_MAGIC = 0x5257 // types.h:427:1:
+ X_SEMA_MAGIC = 0x534d // types.h:425:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIGEVENT = 0 // time.h:132:1:
+ X_SIGSET_T = 0 // select.h:73:1:
+ X_SIGVAL = 0 // time.h:124:1:
+ X_SIZE_T = 0 // types.h:540:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // types.h:549:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SUSECONDS_T = 0 // types.h:343:1:
+ X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_SELECT_H = 0 // select.h:45:1:
+ X_SYS_TIME_H = 0 // time.h:27:1:
+ X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
+ X_SYS_TYPES_H = 0 // types.h:35:1:
+ X_SYS_UUID_H = 0 // uuid.h:28:1:
+ X_TIMER_T = 0 // types.h:573:1:
+ X_TIME_H = 0 // time.h:37:1:
+ X_TIME_T = 0 // types.h:558:1:
+ X_UID_T = 0 // types.h:400:1:
+ X_UUID_H = 0 // uuid.h:32:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175:1:
+)
+
+// used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+const ( /* types.h:215:1: */
+ B_FALSE = 0
+ B_TRUE = 1
+ X_B_FALSE = 0
+ X_B_TRUE = 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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright 2014 Andrew Stormont.
+
+// The copyright in this file is taken from the original Leach & Salz
+// UUID specification, from which this implementation is derived.
+
+// Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
+// Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
+// Digital Equipment Corporation, Maynard, Mass. Copyright (c) 1998
+// Microsoft. To anyone who acknowledges that this file is provided
+// "AS IS" without any express or implied warranty: permission to use,
+// copy, modify, and distribute this file for any purpose is hereby
+// granted without fee, provided that the above copyright notices and
+// this notice appears in all source code copies, and that none of the
+// names of Open Software Foundation, Inc., Hewlett-Packard Company,
+// or Digital Equipment Corporation be used in advertising or
+// publicity pertaining to distribution of the software without
+// specific, written prior permission. Neither Open Software
+// Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
+// Equipment Corporation makes any representations about the
+// suitability of this software for any purpose.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright 2014 Andrew Stormont.
+
+// The copyright in this file is taken from the original Leach & Salz
+// UUID specification, from which this implementation is derived.
+
+// Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
+// Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
+// Digital Equipment Corporation, Maynard, Mass. Copyright (c) 1998
+// Microsoft. To anyone who acknowledges that this file is provided
+// "AS IS" without any express or implied warranty: permission to use,
+// copy, modify, and distribute this file for any purpose is hereby
+// granted without fee, provided that the above copyright notices and
+// this notice appears in all source code copies, and that none of the
+// names of Open Software Foundation, Inc., Hewlett-Packard Company,
+// or Digital Equipment Corporation be used in advertising or
+// publicity pertaining to distribution of the software without
+// specific, written prior permission. Neither Open Software
+// Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
+// Equipment Corporation makes any representations about the
+// suitability of this software for any purpose.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// Machine dependent definitions moved to <sys/machtypes.h>.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Machine dependent types:
+//
+// intel ia32 Version
+
+type Label_t = X_label_t /* machtypes.h:59:54 */
+
+type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
+
+// Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
+// committee's working draft for the revision of the current ISO C standard,
+// ISO/IEC 9899:1990 Programming language - C. These are not currently
+// required by any standard but constitute a useful, general purpose set
+// of type definitions which is namespace clean with respect to all standards.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
+// of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
+// Programming language - C.
+//
+// Programs/Modules should not directly include this file. Access to the
+// types defined in this file should be through the inclusion of one of the
+// following files:
+//
+// <sys/types.h> Provides only the "_t" types defined in this
+// file which is a subset of the contents of
+// <inttypes.h>. (This can be appropriate for
+// all programs/modules except those claiming
+// ANSI-C conformance.)
+//
+// <sys/inttypes.h> Provides the Kernel and Driver appropriate
+// components of <inttypes.h>.
+//
+// <inttypes.h> For use by applications.
+//
+// See these files for more details.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Basic / Extended integer types
+//
+// The following defines the basic fixed-size integer types.
+//
+// Implementations are free to typedef them to Standard C integer types or
+// extensions that they support. If an implementation does not support one
+// of the particular integer data types below, then it should not define the
+// typedefs and macros corresponding to that data type. Note that int8_t
+// is not defined in -Xs mode on ISAs for which the ABI specifies "char"
+// as an unsigned entity because there is no way to define an eight bit
+// signed integral.
+type Int8_t = int8 /* int_types.h:75:16 */
+type Int16_t = int16 /* int_types.h:79:17 */
+type Int32_t = int32 /* int_types.h:80:15 */
+type Int64_t = int64 /* int_types.h:83:16 */
+
+type Uint8_t = uint8 /* int_types.h:91:24 */
+type Uint16_t = uint16 /* int_types.h:92:25 */
+type Uint32_t = uint32 /* int_types.h:93:23 */
+type Uint64_t = uint64 /* int_types.h:95:24 */
+
+// intmax_t and uintmax_t are to be the longest (in number of bits) signed
+// and unsigned integer types supported by the implementation.
+type Intmax_t = int64 /* int_types.h:107:19 */
+type Uintmax_t = uint64 /* int_types.h:108:19 */
+
+// intptr_t and uintptr_t are signed and unsigned integer types large enough
+// to hold any data pointer; that is, data pointers can be assigned into or
+// from these integer types without losing precision.
+type Intptr_t = int64 /* int_types.h:120:16 */
+type Uintptr_t = uint64 /* int_types.h:121:24 */
+
+// The following define the fastest integer types that can hold the
+// specified number of bits.
+type Int_fast8_t = int8 /* int_types.h:132:16 */
+type Int_fast16_t = int32 /* int_types.h:136:15 */
+type Int_fast32_t = int32 /* int_types.h:137:15 */
+type Int_fast64_t = int64 /* int_types.h:139:16 */
+
+type Uint_fast8_t = uint8 /* int_types.h:146:24 */
+type Uint_fast16_t = uint32 /* int_types.h:147:23 */
+type Uint_fast32_t = uint32 /* int_types.h:148:23 */
+type Uint_fast64_t = uint64 /* int_types.h:150:24 */
+
+// The following define the smallest integer types that can hold the
+// specified number of bits.
+type Int_least8_t = int8 /* int_types.h:162:16 */
+type Int_least16_t = int16 /* int_types.h:166:17 */
+type Int_least32_t = int32 /* int_types.h:167:15 */
+type Int_least64_t = int64 /* int_types.h:169:16 */
+
+// If these are changed, please update char16_t and char32_t in head/uchar.h.
+type Uint_least8_t = uint8 /* int_types.h:179:24 */
+type Uint_least16_t = uint16 /* int_types.h:180:25 */
+type Uint_least32_t = uint32 /* int_types.h:181:23 */
+type Uint_least64_t = uint64 /* int_types.h:183:24 */
+
+// Strictly conforming ANSI C environments prior to the 1999
+// revision of the C Standard (ISO/IEC 9899:1999) do not have
+// the long long data type.
+type Longlong_t = int64 /* types.h:72:20 */
+type U_longlong_t = uint64 /* types.h:73:28 */
+
+// These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
+// to use them instead of int32_t and uint32_t because DEC had
+// shipped 64-bit wide.
+type T_scalar_t = int32 /* types.h:92:18 */
+type T_uscalar_t = uint32 /* types.h:93:18 */
+
+// POSIX Extensions
+type Uchar_t = uint8 /* types.h:102:23 */
+type Ushort_t = uint16 /* types.h:103:24 */
+type Uint_t = uint32 /* types.h:104:22 */
+type Ulong_t = uint64 /* types.h:105:23 */
+
+type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
+type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
+type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
+
+// VM-related types
+type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
+type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
+type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
+
+type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
+type Sysid_t = int16 /* types.h:128:16 */
+type Index_t = int16 /* types.h:129:16 */
+type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
+type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
+
+// The size of off_t and related types depends on the setting of
+// _FILE_OFFSET_BITS. (Note that other system headers define other types
+// related to those defined here.)
+//
+// If _LARGEFILE64_SOURCE is defined, variants of these types that are
+// explicitly 64 bits wide become available.
+
+type Off_t = int64 /* types.h:145:15 */ // offsets within files
+
+type Off64_t = int64 /* types.h:152:16 */ // offsets within files
+
+type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
+type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
+type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
+type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
+
+type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
+type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
+type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
+type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
+
+type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
+
+// The boolean_t type has had a varied amount of exposure over the years in
+// terms of how its enumeration constants have been exposed. In particular, it
+// originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
+// B_TRUE and B_FALSE with an underscore. This check never included the
+// question of if we were in a strict ANSI C environment or whether extensions
+// were defined.
+//
+// Compilers such as clang started defaulting to always including an
+// XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
+// This would lead most software that had used the non-underscore versions to
+// need it. As such, we have adjusted the non-strict XOPEN environment to retain
+// its old behavior so as to minimize namespace pollution; however, we instead
+// include both variants of the definitions in the generally visible version
+// allowing software written in either world to hopefully end up in a good
+// place.
+//
+// This isn't perfect, but should hopefully minimize the pain for folks actually
+// trying to build software.
+type Boolean_t = uint32 /* types.h:215:69 */
+
+// The {u,}pad64_t types can be used in structures such that those structures
+// may be accessed by code produced by compilation environments which don't
+// support a 64 bit integral datatype. The intention is not to allow
+// use of these fields in such environments, but to maintain the alignment
+// and offsets of the structure.
+//
+// Similar comments for {u,}pad128_t.
+//
+// Note that these types do NOT generate any stronger alignment constraints
+// than those available in the underlying ABI. See <sys/isa_defs.h>
+type Pad64_t = int64 /* types.h:240:18 */
+type Upad64_t = uint64 /* types.h:241:18 */
+
+type Pad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:257:3 */
+
+type Upad128_t = struct {
+ F_q float64
+ F__ccgo_pad1 [8]byte
+} /* types.h:262:3 */
+
+type Offset_t = int64 /* types.h:264:20 */
+type U_offset_t = uint64 /* types.h:265:22 */
+type Len_t = uint64 /* types.h:266:22 */
+type Diskaddr_t = uint64 /* types.h:267:22 */
+
+// Definitions remaining from previous partial support for 64-bit file
+// offsets. This partial support for devices greater than 2gb requires
+// compiler support for long long.
+type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
+
+type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
+
+type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
+
+// The following type is for various kinds of identifiers. The
+// actual type must be the same for all since some system calls
+// (such as sigsend) take arguments that may be any of these
+// types. The enumeration type idtype_t defined in sys/procset.h
+// is used to indicate what type of id is being specified --
+// a process id, process group id, session id, scheduling class id,
+// user id, group id, project id, task id or zone id.
+type Id_t = int32 /* types.h:329:14 */
+
+type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
+
+// Type useconds_t is an unsigned integral type capable of storing
+// values at least in the range of zero to 1,000,000.
+type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
+
+type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
+
+// Typedefs for dev_t components.
+type Major_t = uint32 /* types.h:351:16 */ // major part of device number
+type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
+
+// The data type of a thread priority.
+type Pri_t = int16 /* types.h:361:15 */
+
+// The data type for a CPU flags field. (Can be extended to larger unsigned
+// types, if needed, limited by ability to update atomically.)
+type Cpu_flag_t = uint16 /* types.h:367:18 */
+
+// For compatibility reasons the following typedefs (prefixed o_)
+// can't grow regardless of the EFT definition. Although,
+// applications should not explicitly use these typedefs
+// they may be included via a system header definition.
+// WARNING: These typedefs may be removed in a future
+// release.
+//
+// ex. the definitions in s5inode.h (now obsoleted)
+// remained small to preserve compatibility
+// in the S5 file system type.
+type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
+type O_dev_t = int16 /* types.h:381:15 */ // old device type
+type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
+type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
+type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
+type O_pid_t = int16 /* types.h:385:15 */ // old process id type
+type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
+
+// POSIX and XOPEN Declarations
+type Key_t = int32 /* types.h:392:13 */ // IPC key type
+type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
+
+type Uid_t = uint32 /* types.h:401:22 */ // UID type
+
+type Gid_t = uint32 /* types.h:404:15 */ // GID type
+
+type Datalink_id_t = uint32 /* types.h:406:18 */
+type Vrid_t = uint32 /* types.h:407:18 */
+
+type Taskid_t = int32 /* types.h:409:17 */
+type Projid_t = int32 /* types.h:410:17 */
+type Poolid_t = int32 /* types.h:411:14 */
+type Zoneid_t = int32 /* types.h:412:14 */
+type Ctid_t = int32 /* types.h:413:14 */
+
+// POSIX definitions are same as defined in thread.h and synch.h.
+// Any changes made to here should be reflected in corresponding
+// files as described in comments.
+type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
+type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type X_pthread_mutex = struct {
+ F__pthread_mutex_flags struct {
+ F__pthread_mutex_flag1 uint16
+ F__pthread_mutex_flag2 uint8
+ F__pthread_mutex_ceiling uint8
+ F__pthread_mutex_type uint16
+ F__pthread_mutex_magic uint16
+ }
+ F__pthread_mutex_lock struct {
+ F__ccgo_pad1 [0]uint64
+ F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
+ }
+ F__pthread_mutex_data uint64
+} /* types.h:429:9 */
+
+// = thread_key_t in thread.h
+
+// "Magic numbers" tagging synchronization object types
+
+type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
+
+type X_pthread_cond = struct {
+ F__pthread_cond_flags struct {
+ F__pthread_cond_flag [4]uint8
+ F__pthread_cond_type uint16
+ F__pthread_cond_magic uint16
+ }
+ F__pthread_cond_data uint64
+} /* types.h:450:9 */
+
+type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
+
+// UNIX 98 Extension
+type X_pthread_rwlock = struct {
+ F__pthread_rwlock_readers int32
+ F__pthread_rwlock_type uint16
+ F__pthread_rwlock_magic uint16
+ F__pthread_rwlock_mutex Pthread_mutex_t
+ F__pthread_rwlock_readercv Pthread_cond_t
+ F__pthread_rwlock_writercv Pthread_cond_t
+} /* types.h:462:9 */
+
+// UNIX 98 Extension
+type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
+
+// SUSV3
+type Pthread_barrier_t = struct {
+ F__pthread_barrier_count uint32
+ F__pthread_barrier_current uint32
+ F__pthread_barrier_cycle uint64
+ F__pthread_barrier_reserved uint64
+ F__pthread_barrier_lock Pthread_mutex_t
+ F__pthread_barrier_cond Pthread_cond_t
+} /* types.h:481:3 */
+
+type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
+
+// attributes for threads, dynamically allocated by library
+type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
+
+// attributes for threads, dynamically allocated by library
+type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
+
+// attributes for mutex, dynamically allocated by library
+type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
+
+// attributes for mutex, dynamically allocated by library
+type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
+
+// attributes for cond, dynamically allocated by library
+type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
+
+// attributes for cond, dynamically allocated by library
+type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
+
+// pthread_once
+type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
+
+// pthread_once
+type Pthread_once_t = X_once /* types.h:511:3 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
+
+// UNIX 98 Extensions
+// attributes for rwlock, dynamically allocated by library
+type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
+
+// SUSV3
+// attributes for pthread_barrier_t, dynamically allocated by library
+type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
+
+type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
+
+type Nlink_t = uint32 /* types.h:532:16 */ // file link type
+type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
+
+type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
+
+type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
+
+type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
+
+type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
+
+type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
+
+// BEGIN CSTYLED
+type Unchar = uint8 /* types.h:580:23 */
+type Ushort = uint16 /* types.h:581:24 */
+type Uint = uint32 /* types.h:582:22 */
+type Ulong = uint64 /* types.h:583:23 */
+// END CSTYLED
+
+// The following is the value of type id_t to use to indicate the
+// caller's current id. See procset.h for the type idtype_t
+// which defines which kind of id is being specified.
+
+// The following value of type pfn_t is used to indicate
+// invalid page frame number.
+
+// BEGIN CSTYLED
+type U_char = uint8 /* types.h:650:23 */
+type U_short = uint16 /* types.h:651:24 */
+type U_int = uint32 /* types.h:652:22 */
+type U_long = uint64 /* types.h:653:23 */
+type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
+
+type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
+type Quad = Quad_t /* types.h:655:17 */ // used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec = struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+} /* time_impl.h:57:9 */
+
+// used by UFS
+// END CSTYLED
+
+// Nested include for BSD/sockets source compatibility.
+// (The select macros used to be defined here).
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Implementation-private. This header should not be included
+// directly by an application. The application should instead
+// include <time.h> which includes this header conditionally
+// depending on which feature test macros are defined. By default,
+// this header is included by <time.h>. X/Open and POSIX
+// standards requirements result in this header being included
+// by <time.h> only under a restricted set of conditions.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Time expressed in seconds and nanoseconds
+
+type Timespec_t = Timespec /* time_impl.h:60:3 */
+
+type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_nsec int64
+ }
+} /* time_impl.h:95:9 */
+
+// definition per SVr4
+
+// The following has been left in for backward compatibility. Portable
+// applications should not use the structure name timestruc.
+
+// Timer specification
+type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright (c) 1982, 1986, 1993 Regents of the University of California.
+// All rights reserved. The Berkeley software License Agreement
+// specifies the terms and conditions for redistribution.
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+
+// Copyright (c) 2013, 2016 by Delphix. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Structure returned by gettimeofday(2) system call,
+// and used in other calls.
+
+type Timeval = struct {
+ Ftv_sec int64
+ Ftv_usec int64
+} /* time.h:54:1 */
+
+type Timezone = struct {
+ Ftz_minuteswest int32
+ Ftz_dsttime int32
+} /* time.h:86:1 */
+
+// Needed for longlong_t type. Placement of this due to <sys/types.h>
+// including <sys/select.h> which relies on the presense of the itimerval
+// structure.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// Operations on timevals.
+
+// Names of the interval timers, and structure
+// defining a timer setting.
+// time and when system is running on
+// behalf of the process.
+// time profiling of multithreaded
+// programs.
+
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+ Fit_value struct {
+ Ftv_sec int64
+ Ftv_usec int64
+ }
+} /* time.h:209:1 */
+
+// Definitions for commonly used resolutions.
+
+// Time expressed as a 64-bit nanosecond counter.
+type Hrtime_t = int64 /* time.h:265:20 */
+
+// The inclusion of <time.h> is historical and was added for
+// backward compatibility in delta 1.2 when a number of definitions
+// were moved out of <sys/time.h>. More recently, the timespec and
+// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
+// _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
+// which is now included by <time.h>. This change was due to POSIX
+// 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
+// non-X/Open applications, including this header will still make
+// visible these definitions.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
+// Copyright 2016 Joyent, Inc.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <time.h.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+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
+} /* time_iso.h:80:1 */
+
+// Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
+// definition of the sigevent structure. Both require the inclusion
+// of <signal.h> and <time.h> when using the timer_create() function.
+// However, X/Open also specifies that the sigevent structure be defined
+// in <time.h> as described in the header <signal.h>. This prevents
+// compiler warnings for applications that only include <time.h> and not
+// also <signal.h>. The sigval union and the sigevent structure is
+// therefore defined both here and in <sys/siginfo.h> which gets included
+// via inclusion of <signal.h>.
+type Sigval = struct {
+ F__ccgo_pad1 [0]uint64
+ Fsival_int int32
+ F__ccgo_pad2 [4]byte
+} /* time.h:125: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
+ }
+ Fsigev_notify_function uintptr
+ Fsigev_notify_attributes uintptr
+ F__sigev_pad2 int32
+ F__ccgo_pad1 [4]byte
+} /* time.h:133:1 */
+
+type Locale_t = uintptr /* time.h:292:24 */
+
+// The inclusion of <sys/select.h> is needed for the FD_CLR,
+// FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
+// select() prototype defined in the XOpen specifications
+// beginning with XSH4v2. Placement required after definition
+// for itimerval.
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+//
+// Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// The sigset_t type is defined in <sys/signal.h> and duplicated
+// in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
+// now allows the visibility of signal.h in this header, however
+// an order of inclusion problem occurs as a result of inclusion
+// of <sys/select.h> in <signal.h> under certain conditions.
+// Rather than include <sys/signal.h> here, we've duplicated
+// the sigset_t type instead. This type is required for the XPG6
+// introduced pselect() function also declared in this header.
+type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
+
+// Select uses bit masks of file descriptors in longs.
+// These macros manipulate such bit fields.
+// FD_SETSIZE may be defined by the user, but the default here
+// should be >= RLIM_FD_MAX.
+
+type Fd_mask = int64 /* select.h:92:14 */
+type Fds_mask = int64 /* select.h:94:14 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
+
+// The value of _NBBY needs to be consistant with the value
+// of NBBY in <sys/param.h>.
+
+type Fd_set = Fd_set1 /* select.h:125:3 */
+
+// _VOID was defined to be either void or char but this is not
+// required because previous SunOS compilers have accepted the void
+// type. However, because many system header and source files use the
+// void keyword, the volatile keyword, and ANSI C function prototypes,
+// non-ANSI compilers cannot compile the system anyway. The _VOID macro
+// should therefore not be used and remains for source compatibility
+// only.
+// CSTYLED
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// The copyright in this file is taken from the original Leach
+// & Salz UUID specification, from which this implementation
+// is derived.
+
+// Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
+// Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
+// Digital Equipment Corporation, Maynard, Mass. Copyright (c) 1998
+// Microsoft. To anyone who acknowledges that this file is provided
+// "AS IS" without any express or implied warranty: permission to use,
+// copy, modify, and distribute this file for any purpose is hereby
+// granted without fee, provided that the above copyright notices and
+// this notice appears in all source code copies, and that none of the
+// names of Open Software Foundation, Inc., Hewlett-Packard Company,
+// or Digital Equipment Corporation be used in advertising or
+// publicity pertaining to distribution of the software without
+// specific, written prior permission. Neither Open Software
+// Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
+// Equipment Corporation makes any representations about the
+// suitability of this software for any purpose.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+//
+// Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+// Copyright 2016 Joyent, Inc.
+// Copyright 2021 Oxide Computer Company
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// University Copyright- Copyright (c) 1982, 1986, 1988
+// The Regents of the University of California
+// All Rights Reserved
+//
+// University Acknowledgment- Portions of this document are derived from
+// software developed by the University of California, Berkeley, and its
+// contributors.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// macros for conversion between host and (internet) network byte order
+
+type In_port_t = uint16 /* byteorder.h:74:18 */
+
+type In_addr_t = uint32 /* byteorder.h:79:18 */
+
+// Macros to reverse byte order
+
+// Macros to convert from a specific byte order to/from native byte order
+
+// Macros to read unaligned values from a specific byte order to
+// native byte order
+
+// Macros to write unaligned values from native byte order to a specific byte
+// order.
+
+type Uuid_node_t = struct{ FnodeID [6]uint8 } /* uuid.h:63:3 */
+
+// The uuid type used throughout when referencing uuids themselves
+type Uuid = struct {
+ Ftime_low uint32
+ Ftime_mid uint16
+ Ftime_hi_and_version uint16
+ Fclock_seq_hi_and_reserved uint8
+ Fclock_seq_low uint8
+ Fnode_addr [6]uint8
+} /* uuid.h:68:1 */
+
+type Uuid_t = [16]uint8 /* uuid.h:81:18 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_mips64le.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_mips64le.go
new file mode 100644
index 000000000..dfd5ff6a9
--- /dev/null
+++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_mips64le.go
@@ -0,0 +1,1986 @@
+// 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_linux_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:28:1:
+ BYTE_ORDER = 1234 // endian.h:30:1:
+ CLOCK_BOOTTIME = 7 // time.h:60:1:
+ CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1:
+ CLOCK_MONOTONIC = 1 // time.h:48:1:
+ CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1:
+ CLOCK_MONOTONIC_RAW = 4 // time.h:54:1:
+ CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1:
+ CLOCK_REALTIME = 0 // time.h:46:1:
+ CLOCK_REALTIME_ALARM = 8 // time.h:62:1:
+ CLOCK_REALTIME_COARSE = 5 // time.h:56:1:
+ CLOCK_TAI = 11 // time.h:66:1:
+ CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1:
+ FD_SETSIZE = 1024 // select.h:73:1:
+ LITTLE_ENDIAN = 1234 // endian.h:27:1:
+ PDP_ENDIAN = 3412 // endian.h:29:1:
+ TIMER_ABSTIME = 1 // time.h:69:1:
+ TIME_UTC = 1 // time.h:65:1:
+ UUID_STR_LEN = 37 // uuid.h:65:1:
+ UUID_TYPE_DCE_MD5 = 3 // uuid.h:58:1:
+ UUID_TYPE_DCE_RANDOM = 4 // uuid.h:59:1:
+ UUID_TYPE_DCE_SECURITY = 2 // uuid.h:57:1:
+ UUID_TYPE_DCE_SHA1 = 5 // uuid.h:60:1:
+ UUID_TYPE_DCE_TIME = 1 // uuid.h:56:1:
+ UUID_TYPE_MASK = 0xf // uuid.h:63:1:
+ UUID_TYPE_SHIFT = 4 // uuid.h:62:1:
+ UUID_VARIANT_DCE = 1 // uuid.h:48:1:
+ UUID_VARIANT_MASK = 0x7 // uuid.h:53:1:
+ UUID_VARIANT_MICROSOFT = 2 // uuid.h:49:1:
+ UUID_VARIANT_NCS = 0 // uuid.h:47:1:
+ UUID_VARIANT_OTHER = 3 // uuid.h:50:1:
+ UUID_VARIANT_SHIFT = 5 // uuid.h:52:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1:
+ X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1:
+ X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TIME_H = 1 // time.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
+ X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1:
+ X_BSD_SIZE_T_ = 0 // stddef.h:189:1:
+ X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_ENDIAN_H = 1 // endian.h:19:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_GCC_SIZE_T = 0 // stddef.h:195:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1:
+ X_SIZET_ = 0 // stddef.h:196:1:
+ X_SIZE_T = 0 // stddef.h:183:1:
+ X_SIZE_T_ = 0 // stddef.h:188:1:
+ X_SIZE_T_DECLARED = 0 // stddef.h:193:1:
+ X_SIZE_T_DEFINED = 0 // stddef.h:191:1:
+ X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_SYS_SELECT_H = 1 // select.h:22:1:
+ X_SYS_SIZE_T_H = 0 // stddef.h:184:1:
+ X_SYS_TIME_H = 1 // time.h:19:1:
+ X_SYS_TYPES_H = 1 // types.h:23:1:
+ X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1:
+ X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1:
+ X_TIME_H = 1 // time.h:23:1:
+ X_T_SIZE = 0 // stddef.h:186:1:
+ X_T_SIZE_ = 0 // stddef.h:185:1:
+ X_UUID_UUID_H = 0 // uuid.h:36:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// Values for the first argument to `getitimer' and `setitimer'.
+const ( /* time.h:89:1: */
+ // Timers run in real time.
+ ITIMER_REAL = 0
+ // Timers run only when the process is executing.
+ ITIMER_VIRTUAL = 1
+ // Timers run when the process is executing and when
+ // the system is executing on behalf of the process.
+ ITIMER_PROF = 2
+)
+
+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 */
+
+// Public include file for the UUID library
+//
+// Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
+//
+// %Begin-Header%
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, and the entire permission notice in its entirety,
+// including the disclaimer of warranties.
+// 2. Redistributions in binary form must reproduce 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 ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
+// WHICH ARE HEREBY 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 NOT ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+// %End-Header%
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+type U_char = X__u_char /* types.h:33:18 */
+type U_short = X__u_short /* types.h:34:19 */
+type U_int = X__u_int /* types.h:35:17 */
+type U_long = X__u_long /* types.h:36:18 */
+type Quad_t = X__quad_t /* types.h:37:18 */
+type U_quad_t = X__u_quad_t /* types.h:38:20 */
+type Fsid_t = X__fsid_t /* types.h:39:18 */
+type Loff_t = X__loff_t /* types.h:42:18 */
+
+type Ino_t = X__ino64_t /* types.h:49:19 */
+
+type Dev_t = X__dev_t /* types.h:59:17 */
+
+type Gid_t = X__gid_t /* types.h:64:17 */
+
+type Mode_t = X__mode_t /* types.h:69:18 */
+
+type Nlink_t = X__nlink_t /* types.h:74:19 */
+
+type Uid_t = X__uid_t /* types.h:79:17 */
+
+type Off_t = X__off64_t /* types.h:87:19 */
+
+type Pid_t = X__pid_t /* types.h:97:17 */
+
+type Id_t = X__id_t /* types.h:103:16 */
+
+type Ssize_t = X__ssize_t /* types.h:108:19 */
+
+type Daddr_t = X__daddr_t /* types.h:114:19 */
+type Caddr_t = X__caddr_t /* types.h:115:19 */
+
+type Key_t = X__key_t /* types.h:121:17 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `clock'.
+type Clock_t = X__clock_t /* clock_t.h:7:19 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Clock ID used in clock and timer functions.
+type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Returned by `time'.
+type Time_t = X__time_t /* time_t.h:7:18 */
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Timer ID returned by `timer_create'.
+type Timer_t = X__timer_t /* timer_t.h:7:19 */
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// Old compatibility names for C types.
+type Ulong = uint64 /* types.h:148:27 */
+type Ushort = uint16 /* types.h:149:28 */
+type Uint = uint32 /* types.h:150:22 */
+
+// These size-specific names are used by some of the inet code.
+
+// Define intN_t types.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+type Int8_t = X__int8_t /* stdint-intn.h:24:18 */
+type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
+type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
+type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
+
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
+
+type Register_t = int32 /* types.h:164:13 */
+
+// It also defines `fd_set' and the FD_* macros for `select'.
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Get definition of needed basic types.
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Get __FD_* definitions.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Get sigset_t.
+
+type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
+
+// A set of signals to be blocked, unblocked, or waited for.
+type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
+
+// Get definition of timer specification structures.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+type Timeval = struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+} /* struct_timeval.h:8:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// POSIX.1b structure for a time value. This is like a `struct timeval' but
+//
+// has nanoseconds instead of microseconds.
+type Timespec = struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+} /* struct_timespec.h:10:1 */
+
+type Suseconds_t = X__suseconds_t /* select.h:43:23 */
+
+// The fd_set member is required to be an array of longs.
+type X__fd_mask = int64 /* select.h:49:18 */
+
+// Some versions of <linux/posix_types.h> define this macros.
+// It's easier to assume 8-bit bytes than to get CHAR_BIT.
+
+// fd_set for select and pselect.
+type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
+
+// Maximum number of file descriptors in `fd_set'.
+
+// Sometimes the fd_set member is assumed to have this type.
+type Fd_mask = X__fd_mask /* select.h:77:19 */
+
+// Define some inlines helping to catch common problems.
+
+type Blksize_t = X__blksize_t /* types.h:185:21 */
+
+// Types from the Large File Support interface.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_internal_list = struct {
+ F__prev uintptr
+ F__next uintptr
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+
+// Common definition of pthread_mutex_t.
+
+type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */
+
+type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// x86 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_mutex_s = struct {
+ F__lock int32
+ F__count uint32
+ F__owner int32
+ F__nusers uint32
+ F__kind int32
+ F__spins int16
+ F__elision int16
+ F__list X__pthread_list_t
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// x86 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+type X__pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__rwelision int8
+ F__pad1 [7]uint8
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
+
+// Common definition of pthread_cond_t.
+
+type X__pthread_cond_s = struct {
+ F__0 struct{ F__wseq uint64 }
+ F__8 struct{ F__g1_start uint64 }
+ F__g_refs [2]uint32
+ F__g_size [2]uint32
+ F__g1_orig_size uint32
+ F__wrefs uint32
+ F__g_signals [2]uint32
+} /* thread-shared-types.h:92:1 */
+
+// Thread identifiers. The structure of the attribute type is not
+//
+// 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 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.
+type Pthread_condattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:45:3 */
+
+// Keys for thread-specific data
+type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
+
+// Once-only execution
+type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
+
+type Pthread_attr_t1 = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [56]int8
+} /* pthreadtypes.h:56:1 */
+
+type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
+
+type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */
+
+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.
+type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
+
+type Pthread_rwlockattr_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [8]int8
+} /* pthreadtypes.h:97:3 */
+
+// POSIX spinlock data type.
+type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
+
+// POSIX barriers data type. The structure of the type is
+//
+// deliberately not exposed.
+type Pthread_barrier_t = struct {
+ F__ccgo_pad1 [0]uint64
+ F__size [32]int8
+} /* pthreadtypes.h:112:3 */
+
+type Pthread_barrierattr_t = struct {
+ F__ccgo_pad1 [0]uint32
+ F__size [4]int8
+} /* pthreadtypes.h:118:3 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// `fd_set' type and related macros, and `select'/`pselect' declarations.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// 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.
+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'.
+type Itimerval = struct {
+ Fit_interval struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+ }
+ Fit_value struct {
+ Ftv_sec X__time_t
+ Ftv_usec X__suseconds_t
+ }
+} /* time.h:105:1 */
+
+type X__itimer_which_t = int32 /* time.h:118:13 */
+
+// Convenience macros for operations on timevals.
+// NOTE: `timercmp' does not work for >= or <=.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.23 Date and time <time.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Copyright (C) 1989-2020 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+//
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// ISO C Standard: 7.17 Common definitions <stddef.h>
+
+// Any one of these symbols __need_* means that GNU libc
+// wants us just to define one data type. So don't define
+// the symbols that indicate this file's entire job has been done.
+
+// This avoids lossage on SunOS but only if stdtypes.h comes first.
+// There's no way to win with the other order! Sun lossage.
+
+// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+// Just ignore it.
+
+// On VxWorks, <type/vxTypesBase.h> may have defined macros like
+// _TYPE_size_t which will typedef size_t. fixincludes patched the
+// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
+// not defined, and so that defining this macro defines _GCC_SIZE_T.
+// If we find that the macros are still defined at this point, we must
+// invoke them so that the type is defined as expected.
+
+// In case nobody has defined these types, but we aren't running under
+// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
+// __WCHAR_TYPE__ have reasonable values. This can happen if the
+// parts of GCC is compiled by an older compiler, that actually
+// include gstddef.h, such as collect2.
+
+// Signed type of difference of two pointers.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Unsigned type of `sizeof' something.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// Wide character type.
+// Locale-writers should change this as necessary to
+// be big enough to hold unique values not between 0 and 127,
+// and not (wchar_t) -1, for each defined multibyte character.
+
+// Define this type if we are doing the whole job,
+// or if we want this type in particular.
+
+// A null pointer constant.
+
+// This defines CLOCKS_PER_SEC, which is the number of processor clock
+// ticks per second, and possibly a number of other constants.
+// System-dependent timing definitions. Linux version.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <time.h> instead.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// ISO/IEC 9899:1999 7.23.1: Components of time
+// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+// the number per second of the value returned by the `clock' function.
+// CAE XSH, Issue 4, Version 2: <time.h>
+// The value of CLOCKS_PER_SEC is required to be 1 million on all
+// XSI-conformant systems.
+
+// Identifier for system-wide realtime clock.
+// Monotonic system-wide clock.
+// High-resolution timer from the CPU.
+// Thread-specific CPU-time clock.
+// Monotonic system-wide clock, not adjusted for frequency scaling.
+// Identifier for system-wide realtime clock, updated only on ticks.
+// Monotonic system-wide clock, updated only on ticks.
+// Monotonic system-wide clock that includes time spent in suspension.
+// Like CLOCK_REALTIME but also wakes suspended system.
+// Like CLOCK_BOOTTIME but also wakes suspended system.
+// Like CLOCK_REALTIME but in International Atomic Time.
+
+// Flag to indicate time is absolute.
+
+// Many of the typedefs and structs whose official home is this header
+// may also need to be defined by other headers.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// ISO C `broken-down time' structure.
+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
+} /* struct_tm.h:7:1 */
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// NB: Include guard matches what <linux/time.h> uses.
+
+// POSIX.1b structure for timer start values and intervals.
+type Itimerspec = struct {
+ Fit_interval struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+ Fit_value struct {
+ Ftv_sec X__time_t
+ Ftv_nsec X__syscall_slong_t
+ }
+} /* struct_itimerspec.h:8:1 */
+
+// Definition of locale_t.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of struct __locale_struct and __locale_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX.1-2008: the locale_t type, representing a locale context
+// (implementation-namespace version). This type should be treated
+// as opaque by applications; some details are exposed for the sake of
+// efficiency in e.g. ctype functions.
+
+type X__locale_struct = struct {
+ F__locales [13]uintptr
+ F__ctype_b uintptr
+ F__ctype_tolower uintptr
+ F__ctype_toupper uintptr
+ F__names [13]uintptr
+} /* __locale_t.h:28:1 */
+
+type X__locale_t = uintptr /* __locale_t.h:42:32 */
+
+type Locale_t = X__locale_t /* locale_t.h:24:20 */
+
+type Uuid_t = [16]uint8 /* uuid.h:44:23 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/wctype/capi_illumos_amd64.go b/vendor/modernc.org/libc/wctype/capi_illumos_amd64.go
new file mode 100644
index 000000000..da3ab522d
--- /dev/null
+++ b/vendor/modernc.org/libc/wctype/capi_illumos_amd64.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_illumos_amd64.go -pkgname wctype', DO NOT EDIT.
+
+package wctype
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/wctype/capi_linux_loong64.go b/vendor/modernc.org/libc/wctype/capi_linux_loong64.go
index e1138ccd5..397806877 100644
--- a/vendor/modernc.org/libc/wctype/capi_linux_loong64.go
+++ b/vendor/modernc.org/libc/wctype/capi_linux_loong64.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 -ignore-unsupported-alignment -o wctype/wctype_linux_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_linux_loong64.go -pkgname wctype', DO NOT EDIT.
package wctype
diff --git a/vendor/modernc.org/libc/wctype/capi_linux_mips64le.go b/vendor/modernc.org/libc/wctype/capi_linux_mips64le.go
new file mode 100644
index 000000000..e1138ccd5
--- /dev/null
+++ b/vendor/modernc.org/libc/wctype/capi_linux_mips64le.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_linux_amd64.go -pkgname wctype', DO NOT EDIT.
+
+package wctype
+
+var CAPI = map[string]struct{}{}
diff --git a/vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go b/vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go
new file mode 100644
index 000000000..53a659c43
--- /dev/null
+++ b/vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go
@@ -0,0 +1,1763 @@
+// 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_illumos_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 (
+ BUFSIZ = 1024 // stdio_iso.h:124:1:
+ CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
+ EOF = -1 // stdio_iso.h:152:1:
+ FILENAME_MAX = 1024 // stdio_iso.h:156:1:
+ FOPEN_MAX = 20 // stdio_iso.h:155:1:
+ L_ctermid = 9 // stdio.h:207:1:
+ L_cuserid = 9 // stdio.h:211:1:
+ L_tmpnam = 25 // stdio_iso.h:163:1:
+ P_tmpdir = "/var/tmp/" // stdio.h:220:1:
+ SEEK_CUR = 1 // stdio_iso.h:159:1:
+ SEEK_END = 2 // stdio_iso.h:160:1:
+ SEEK_SET = 0 // stdio_iso.h:158:1:
+ TMP_MAX = 17576 // stdio_iso.h:161:1:
+ WCHAR_MAX = 2147483647 // wchar_iso.h:125:1:
+ WCHAR_MIN = -2147483648 // wchar_iso.h:128:1:
+ X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
+ X_ANSI_STDDEF_H = 0 // stddef.h:42:1:
+ X_B = 0x00000040 // ctype_iso.h:59:1:
+ X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
+ X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
+ X_BSD_PTRDIFF_T_ = 0 // stddef.h:137:1:
+ X_C = 0x00000020 // ctype_iso.h:58:1:
+ X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
+ X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
+ X_CLOCK_T = 0 // time_iso.h:69:1:
+ X_CTYPE_H = 0 // ctype.h:34:1:
+ X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
+ X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
+ X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
+ X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
+ X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
+ X_E1 = 0x00000100 // wctype_iso.h:112:1:
+ X_E10 = 0x00020000 // wctype_iso.h:122:1:
+ X_E11 = 0x00040000 // wctype_iso.h:123:1:
+ X_E12 = 0x00080000 // wctype_iso.h:124:1:
+ X_E13 = 0x00100000 // wctype_iso.h:125:1:
+ X_E14 = 0x00200000 // wctype_iso.h:126:1:
+ X_E15 = 0x00400000 // wctype_iso.h:127:1:
+ X_E16 = 0x00800000 // wctype_iso.h:128:1:
+ X_E17 = 0x01000000 // wctype_iso.h:129:1:
+ X_E18 = 0x02000000 // wctype_iso.h:130:1:
+ X_E19 = 0x04000000 // wctype_iso.h:131:1:
+ X_E2 = 0x00000200 // wctype_iso.h:113:1:
+ X_E20 = 0x08000000 // wctype_iso.h:132:1:
+ X_E21 = 0x10000000 // wctype_iso.h:133:1:
+ X_E22 = 0x20000000 // wctype_iso.h:134:1:
+ X_E23 = 0x40000000 // wctype_iso.h:135:1:
+ X_E24 = 0x80000000 // wctype_iso.h:136:1:
+ X_E3 = 0x00000400 // wctype_iso.h:114:1:
+ X_E4 = 0x00000800 // wctype_iso.h:115:1:
+ X_E5 = 0x00001000 // wctype_iso.h:116:1:
+ X_E6 = 0x00002000 // wctype_iso.h:117:1:
+ X_E7 = 0x00004000 // wctype_iso.h:118:1:
+ X_E8 = 0x00008000 // wctype_iso.h:119:1:
+ X_E9 = 0x00010000 // wctype_iso.h:121:1:
+ X_FILEDEFED = 0 // stdio_iso.h:101:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
+ X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
+ X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
+ X_GCC_MAX_ALIGN_T = 0 // stddef.h:420:1:
+ X_GCC_PTRDIFF_T = 0 // stddef.h:139:1:
+ X_GCC_WCHAR_T = 0 // stddef.h:280:1:
+ X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
+ X_IEEE_754 = 0 // isa_defs.h:246:1:
+ X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
+ X_IOEOF = 0020 // stdio_iso.h:143:1:
+ X_IOERR = 0040 // stdio_iso.h:144:1:
+ X_IOFBF = 0000 // stdio_iso.h:140:1:
+ X_IOLBF = 0100 // stdio_iso.h:141:1:
+ X_IOMYBUF = 0010 // stdio_iso.h:149:1:
+ X_IONBF = 0004 // stdio_iso.h:142:1:
+ X_IOREAD = 0001 // stdio_iso.h:146:1:
+ X_IORW = 0200 // stdio_iso.h:148:1:
+ X_IOWRT = 0002 // stdio_iso.h:147:1:
+ X_ISALNUM = 16388 // ctype_iso.h:73:1:
+ X_ISALPHA = 0x00004000 // ctype_iso.h:71:1:
+ X_ISBLANK = 64 // ctype_iso.h:68:1:
+ X_ISCNTRL = 32 // ctype_iso.h:67:1:
+ X_ISDIGIT = 4 // ctype_iso.h:64:1:
+ X_ISGRAPH = 0x00002000 // ctype_iso.h:70:1:
+ X_ISLOWER = 2 // ctype_iso.h:63:1:
+ X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
+ X_ISO_CTYPE_ISO_H = 0 // ctype_iso.h:45:1:
+ X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
+ X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
+ X_ISO_STDIO_C99_H = 0 // stdio_c99.h:41:1:
+ X_ISO_STDIO_ISO_H = 0 // stdio_iso.h:59:1:
+ X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
+ X_ISO_WCHAR_C99_H = 0 // wchar_c99.h:41:1:
+ X_ISO_WCHAR_ISO_H = 0 // wchar_iso.h:43:1:
+ X_ISO_WCTYPE_ISO_H = 0 // wctype_iso.h:46:1:
+ X_ISPRINT = 0x00008000 // ctype_iso.h:72:1:
+ X_ISPUNCT = 16 // ctype_iso.h:66:1:
+ X_ISSPACE = 8 // ctype_iso.h:65:1:
+ X_ISUPPER = 1 // ctype_iso.h:62:1:
+ X_ISXDIGIT = 128 // ctype_iso.h:69:1:
+ X_L = 0x00000002 // ctype_iso.h:54:1:
+ X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
+ X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
+ X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
+ X_LOCALE_T = 0 // ctype.h:94:1:
+ X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
+ X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
+ X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
+ X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
+ X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
+ X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
+ X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
+ X_LP64 = 1 // <predefined>:286:1:
+ X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
+ X_MBSTATET_H = 0 // wchar_impl.h:39:1:
+ X_MBSTATE_T = 0 // wchar_iso.h:133:1:
+ X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
+ X_N = 0x00000004 // ctype_iso.h:55:1:
+ X_NFILE = 20 // stdio_iso.h:135:1:
+ X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
+ X_OFF_T = 0 // stdio.h:170:1:
+ X_P = 0x00000010 // ctype_iso.h:57:1:
+ X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
+ X_PSM_MODULES = 0 // isa_defs.h:284:1:
+ X_PTRDIFF_T = 0 // stddef.h:132:1:
+ X_PTRDIFF_T_ = 0 // stddef.h:136:1:
+ X_PTRDIFF_T_DECLARED = 0 // stddef.h:140:1:
+ X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
+ X_RTC_CONFIG = 0 // isa_defs.h:285:1:
+ X_S = 0x00000008 // ctype_iso.h:56:1:
+ X_SBFSIZ = 8 // stdio_iso.h:138:1:
+ X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
+ X_SIZE_T = 0 // time_iso.h:60:1:
+ X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
+ X_SSIZE_T = 0 // stdio.h:268:1:
+ X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
+ X_STDC_C11 = 0 // feature_tests.h:165:1:
+ X_STDC_C99 = 0 // feature_tests.h:169:1:
+ X_STDDEF_H = 0 // stddef.h:39:1:
+ X_STDDEF_H_ = 0 // stddef.h:40:1:
+ X_STDIO_H = 0 // stdio.h:44:1:
+ X_STDIO_IMPL_H = 0 // stdio_impl.h:28:1:
+ X_STDIO_TAG_H = 0 // stdio_tag.h:28:1:
+ X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
+ X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
+ X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
+ X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
+ X_SYS_NULL_H = 0 // null.h:17:1:
+ X_SYS_VA_LIST_H = 0 // va_list.h:34:1:
+ X_TIME_T = 0 // time_iso.h:74:1:
+ X_T_PTRDIFF = 0 // stddef.h:134:1:
+ X_T_PTRDIFF_ = 0 // stddef.h:133:1:
+ X_T_WCHAR = 0 // stddef.h:271:1:
+ X_T_WCHAR_ = 0 // stddef.h:270:1:
+ X_U = 0x00000001 // ctype_iso.h:53:1:
+ X_WCHAR_H = 0 // wchar.h:37:1:
+ X_WCHAR_IMPL_H = 0 // wchar_impl.h:28:1:
+ X_WCHAR_T = 0 // stddef.h:269:1:
+ X_WCHAR_T_ = 0 // stddef.h:273:1:
+ X_WCHAR_T_DECLARED = 0 // stddef.h:281:1:
+ X_WCHAR_T_DEFINED = 0 // stddef.h:276:1:
+ X_WCHAR_T_DEFINED_ = 0 // stddef.h:275:1:
+ X_WCHAR_T_H = 0 // stddef.h:277:1:
+ X_WCTYPE_H = 0 // wctype.h:34:1:
+ X_WCTYPE_T = 0 // wctype_iso.h:68:1:
+ X_WINT_T = 0 // wctype_iso.h:59:1:
+ X_X = 0x00000080 // ctype_iso.h:60:1:
+ X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
+ Sun = 1 // <predefined>:172:1:
+ Unix = 1 // <predefined>:175: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 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// wctype.h 1.13 89/11/02 SMI; JLE
+// from AT&T JAE 2.1
+// definitions for international functions
+
+// Copyright 2015 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2015 EveryCity Ltd. All rights reserved.
+// Copyright 2019 Joyent, Inc.
+
+// This file contains definitions designed to enable different compilers
+// to be used harmoniously on Solaris systems.
+
+// Allow for version tests for compiler bugs and features.
+
+// analogous to lint's PRINTFLIKEn
+
+// Handle the kernel printf routines that can take '%b' too
+
+// This one's pretty obvious -- the function never returns
+
+// The function is 'extern inline' and expects GNU C89 behaviour, not C99
+// behaviour.
+//
+// Should only be used on 'extern inline' definitions for GCC.
+
+// The function has control flow such that it may return multiple times (in
+// the manner of setjmp or vfork)
+
+// This is an appropriate label for functions that do not
+// modify their arguments, e.g. strlen()
+
+// This is a stronger form of __pure__. Can be used for functions
+// that do not modify their arguments and don't depend on global
+// memory.
+
+// This attribute, attached to a variable, means that the variable is meant to
+// be possibly unused. GCC will not produce a warning for this variable.
+
+// Shorthand versions for readability
+
+// In release build, disable warnings about variables
+// which are used only for debugging.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+// This header file serves to group a set of well known defines and to
+// set these for each instruction set architecture. These defines may
+// be divided into two groups; characteristics of the processor and
+// implementation choices for Solaris on a processor.
+//
+// Processor Characteristics:
+//
+// _LITTLE_ENDIAN / _BIG_ENDIAN:
+// The natural byte order of the processor. A pointer to an int points
+// to the least/most significant byte of that int.
+//
+// _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
+// The processor specific direction of stack growth. A push onto the
+// stack increases/decreases the stack pointer, so it stores data at
+// successively higher/lower addresses. (Stackless machines ignored
+// without regrets).
+//
+// _LONG_LONG_HTOL / _LONG_LONG_LTOH:
+// A pointer to a long long points to the most/least significant long
+// within that long long.
+//
+// _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
+// The C compiler assigns bit fields from the high/low to the low/high end
+// of an int (most to least significant vs. least to most significant).
+//
+// _IEEE_754:
+// The processor (or supported implementations of the processor)
+// supports the ieee-754 floating point standard. No other floating
+// point standards are supported (or significant). Any other supported
+// floating point formats are expected to be cased on the ISA processor
+// symbol.
+//
+// _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
+// The C Compiler implements objects of type `char' as `unsigned' or
+// `signed' respectively. This is really an implementation choice of
+// the compiler writer, but it is specified in the ABI and tends to
+// be uniform across compilers for an instruction set architecture.
+// Hence, it has the properties of a processor characteristic.
+//
+// _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
+// _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
+// _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
+// The ABI defines alignment requirements of each of the primitive
+// object types. Some, if not all, may be hardware requirements as
+// well. The values are expressed in "byte-alignment" units.
+//
+// _MAX_ALIGNMENT:
+// The most stringent alignment requirement as specified by the ABI.
+// Equal to the maximum of all the above _XXX_ALIGNMENT values.
+//
+// _MAX_ALIGNMENT_TYPE:
+// The name of the C type that has the value descried in _MAX_ALIGNMENT.
+//
+// _ALIGNMENT_REQUIRED:
+// True or false (1 or 0) whether or not the hardware requires the ABI
+// alignment.
+//
+// _LONG_LONG_ALIGNMENT_32
+// The 32-bit ABI supported by a 64-bit kernel may have different
+// alignment requirements for primitive object types. The value of this
+// identifier is expressed in "byte-alignment" units.
+//
+// _HAVE_CPUID_INSN
+// This indicates that the architecture supports the 'cpuid'
+// instruction as defined by Intel. (Intel allows other vendors
+// to extend the instruction for their own purposes.)
+//
+//
+// Implementation Choices:
+//
+// _ILP32 / _LP64:
+// This specifies the compiler data type implementation as specified in
+// the relevant ABI. The choice between these is strongly influenced
+// by the underlying hardware, but is not absolutely tied to it.
+// Currently only two data type models are supported:
+//
+// _ILP32:
+// Int/Long/Pointer are 32 bits. This is the historical UNIX
+// and Solaris implementation. Due to its historical standing,
+// this is the default case.
+//
+// _LP64:
+// Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
+// implementation for 64-bit ABIs such as SPARC V9.
+//
+// _I32LPx:
+// A compilation environment where 'int' is 32-bit, and
+// longs and pointers are simply the same size.
+//
+// In all cases, Char is 8 bits and Short is 16 bits.
+//
+// _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
+// This specifies the form of the disk VTOC (or label):
+//
+// _SUNOS_VTOC_8:
+// This is a VTOC form which is upwardly compatible with the
+// SunOS 4.x disk label and allows 8 partitions per disk.
+//
+// _SUNOS_VTOC_16:
+// In this format the incore vtoc image matches the ondisk
+// version. It allows 16 slices per disk, and is not
+// compatible with the SunOS 4.x disk label.
+//
+// Note that these are not the only two VTOC forms possible and
+// additional forms may be added. One possible form would be the
+// SVr4 VTOC form. The symbol for that is reserved now, although
+// it is not implemented.
+//
+// _SVR4_VTOC_16:
+// This VTOC form is compatible with the System V Release 4
+// VTOC (as implemented on the SVr4 Intel and 3b ports) with
+// 16 partitions per disk.
+//
+//
+// _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
+// This describes the type of addresses used by system DMA:
+//
+// _DMA_USES_PHYSADDR:
+// This type of DMA, used in the x86 implementation,
+// requires physical addresses for DMA buffers. The 24-bit
+// addresses used by some legacy boards is the source of the
+// "low-memory" (<16MB) requirement for some devices using DMA.
+//
+// _DMA_USES_VIRTADDR:
+// This method of DMA allows the use of virtual addresses for
+// DMA transfers.
+//
+// _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
+// This indicates the presence/absence of an fdisk table.
+//
+// _FIRMWARE_NEEDS_FDISK
+// The fdisk table is required by system firmware. If present,
+// it allows a disk to be subdivided into multiple fdisk
+// partitions, each of which is equivalent to a separate,
+// virtual disk. This enables the co-existence of multiple
+// operating systems on a shared hard disk.
+//
+// _NO_FDISK_PRESENT
+// If the fdisk table is absent, it is assumed that the entire
+// media is allocated for a single operating system.
+//
+// _HAVE_TEM_FIRMWARE
+// Defined if this architecture has the (fallback) option of
+// using prom_* calls for doing I/O if a suitable kernel driver
+// is not available to do it.
+//
+// _DONT_USE_1275_GENERIC_NAMES
+// Controls whether or not device tree node names should
+// comply with the IEEE 1275 "Generic Names" Recommended
+// Practice. With _DONT_USE_GENERIC_NAMES, device-specific
+// names identifying the particular device will be used.
+//
+// __i386_COMPAT
+// This indicates whether the i386 ABI is supported as a *non-native*
+// mode for the platform. When this symbol is defined:
+// - 32-bit xstat-style system calls are enabled
+// - 32-bit xmknod-style system calls are enabled
+// - 32-bit system calls use i386 sizes -and- alignments
+//
+// Note that this is NOT defined for the i386 native environment!
+//
+// __x86
+// This is ONLY a synonym for defined(__i386) || defined(__amd64)
+// which is useful only insofar as these two architectures share
+// common attributes. Analogous to __sparc.
+//
+// _PSM_MODULES
+// This indicates whether or not the implementation uses PSM
+// modules for processor support, reading /etc/mach from inside
+// the kernel to extract a list.
+//
+// _RTC_CONFIG
+// This indicates whether or not the implementation uses /etc/rtc_config
+// to configure the real-time clock in the kernel.
+//
+// _UNIX_KRTLD
+// This indicates that the implementation uses a dynamically
+// linked unix + krtld to form the core kernel image at boot
+// time, or (in the absence of this symbol) a prelinked kernel image.
+//
+// _OBP
+// This indicates the firmware interface is OBP.
+//
+// _SOFT_HOSTID
+// This indicates that the implementation obtains the hostid
+// from the file /etc/hostid, rather than from hardware.
+
+// The following set of definitions characterize Solaris on AMD's
+// 64-bit systems.
+
+// Define the appropriate "processor characteristics"
+
+// Different alignment constraints for the i386 ABI in compatibility mode
+
+// Define the appropriate "implementation choices".
+
+// The feature test macro __i386 is generic for all processors implementing
+// the Intel 386 instruction set or a superset of it. Specifically, this
+// includes all members of the 386, 486, and Pentium family of processors.
+
+// Values of _POSIX_C_SOURCE
+//
+// undefined not a POSIX compilation
+// 1 POSIX.1-1990 compilation
+// 2 POSIX.2-1992 compilation
+// 199309L POSIX.1b-1993 compilation (Real Time)
+// 199506L POSIX.1c-1995 compilation (POSIX Threads)
+// 200112L POSIX.1-2001 compilation (Austin Group Revision)
+// 200809L POSIX.1-2008 compilation
+
+// The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
+// and _STDC_C99 are Sun implementation specific macros created in order to
+// compress common standards specified feature test macros for easier reading.
+// These macros should not be used by the application developer as
+// unexpected results may occur. Instead, the user should reference
+// standards(7) for correct usage of the standards feature test macros.
+//
+// __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
+// X/Open or POSIX or in the negative, when neither
+// X/Open or POSIX defines a symbol.
+//
+// _STRICT_STDC __STDC__ is specified by the C Standards and defined
+// by the compiler. For Sun compilers the value of
+// __STDC__ is either 1, 0, or not defined based on the
+// compilation mode (see cc(1)). When the value of
+// __STDC__ is 1 and in the absence of any other feature
+// test macros, the namespace available to the application
+// is limited to only those symbols defined by the C
+// Standard. _STRICT_STDC provides a more readable means
+// of identifying symbols defined by the standard, or in
+// the negative, symbols that are extensions to the C
+// Standard. See additional comments for GNU C differences.
+//
+// _STDC_C99 __STDC_VERSION__ is specified by the C standards and
+// defined by the compiler and indicates the version of
+// the C standard. A value of 199901L indicates a
+// compiler that complies with ISO/IEC 9899:1999, other-
+// wise known as the C99 standard.
+//
+// _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
+// is 201112L indicating a compiler that compiles with
+// ISO/IEC 9899:2011, otherwise known as the C11 standard.
+//
+// _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
+// by the standards, and the user has not explicitly
+// relaxed the strictness via __EXTENSIONS__.
+
+// ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
+// 99899:2011 specify the following predefined macro name:
+//
+// __STDC__ The integer constant 1, intended to indicate a conforming
+// implementation.
+//
+// Furthermore, a strictly conforming program shall use only those features
+// of the language and library specified in these standards. A conforming
+// implementation shall accept any strictly conforming program.
+//
+// Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
+// strictly conforming environments and __STDC__ to 0 for environments that
+// use ANSI C semantics but allow extensions to the C standard. For non-ANSI
+// C semantics, Sun's C compiler does not define __STDC__.
+//
+// The GNU C project interpretation is that __STDC__ should always be defined
+// to 1 for compilation modes that accept ANSI C syntax regardless of whether
+// or not extensions to the C standard are used. Violations of conforming
+// behavior are conditionally flagged as warnings via the use of the
+// -pedantic option. In addition to defining __STDC__ to 1, the GNU C
+// compiler also defines __STRICT_ANSI__ as a means of specifying strictly
+// conforming environments using the -ansi or -std=<standard> options.
+//
+// In the absence of any other compiler options, Sun and GNU set the value
+// of __STDC__ as follows when using the following options:
+//
+// Value of __STDC__ __STRICT_ANSI__
+//
+// cc -Xa (default) 0 undefined
+// cc -Xt (transitional) 0 undefined
+// cc -Xc (strictly conforming) 1 undefined
+// cc -Xs (K&R C) undefined undefined
+//
+// gcc (default) 1 undefined
+// gcc -ansi, -std={c89, c99,...) 1 defined
+// gcc -traditional (K&R) undefined undefined
+//
+// The default compilation modes for Sun C compilers versus GNU C compilers
+// results in a differing value for __STDC__ which results in a more
+// restricted namespace when using Sun compilers. To allow both GNU and Sun
+// interpretations to peacefully co-exist, we use the following Sun
+// implementation _STRICT_STDC_ macro:
+
+// Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
+
+// Use strict symbol visibility.
+
+// This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
+// governed by POSIX, but have not been governed by ISO C. One can go two ways
+// on what should happen if an application actively includes (not transitively)
+// a header that isn't part of the ISO C spec, we opt to say that if someone has
+// gone out of there way then they're doing it for a reason and that is an act
+// of non-compliance and therefore it's not up to us to hide away every symbol.
+//
+// In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
+// cases where in the past we have only used a POSIX related check and we don't
+// wish to make something stricter. Often applications are relying on the
+// ability to, or more realistically unwittingly, have _STRICT_STDC declared and
+// still use these interfaces.
+
+// Large file interfaces:
+//
+// _LARGEFILE_SOURCE
+// 1 large file-related additions to POSIX
+// interfaces requested (fseeko, etc.)
+// _LARGEFILE64_SOURCE
+// 1 transitional large-file-related interfaces
+// requested (seek64, stat64, etc.)
+//
+// The corresponding announcement macros are respectively:
+// _LFS_LARGEFILE
+// _LFS64_LARGEFILE
+// (These are set in <unistd.h>.)
+//
+// Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
+// well.
+//
+// The large file interfaces are made visible regardless of the initial values
+// of the feature test macros under certain circumstances:
+// - If no explicit standards-conforming environment is requested (neither
+// of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
+// __STDC__ does not imply standards conformance).
+// - Extended system interfaces are explicitly requested (__EXTENSIONS__
+// is defined).
+// - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
+// defined). (Note that this dependency is an artifact of the current
+// kernel implementation and may change in future releases.)
+
+// Large file compilation environment control:
+//
+// The setting of _FILE_OFFSET_BITS controls the size of various file-related
+// types and governs the mapping between file-related source function symbol
+// names and the corresponding binary entry points.
+//
+// In the 32-bit environment, the default value is 32; if not set, set it to
+// the default here, to simplify tests in other headers.
+//
+// In the 64-bit compilation environment, the only value allowed is 64.
+
+// Use of _XOPEN_SOURCE
+//
+// The following X/Open specifications are supported:
+//
+// X/Open Portability Guide, Issue 3 (XPG3)
+// X/Open CAE Specification, Issue 4 (XPG4)
+// X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
+// X/Open CAE Specification, Issue 5 (XPG5)
+// Open Group Technical Standard, Issue 6 (XPG6), also referred to as
+// IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
+// Open Group Technical Standard, Issue 7 (XPG7), also referred to as
+// IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
+//
+// XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
+// XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
+// Version 2 (SUSv2)
+// XPG6 is the result of a merge of the X/Open and POSIX specifications
+// and as such is also referred to as IEEE Std. 1003.1-2001 in
+// addition to UNIX 03 and SUSv3.
+// XPG7 is also referred to as UNIX 08 and SUSv4.
+//
+// When writing a conforming X/Open application, as per the specification
+// requirements, the appropriate feature test macros must be defined at
+// compile time. These are as follows. For more info, see standards(7).
+//
+// Feature Test Macro Specification
+// ------------------------------------------------ -------------
+// _XOPEN_SOURCE XPG3
+// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
+// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
+// _XOPEN_SOURCE = 500 XPG5
+// _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
+// _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
+//
+// In order to simplify the guards within the headers, the following
+// implementation private test macros have been created. Applications
+// must NOT use these private test macros as unexpected results will
+// occur.
+//
+// Note that in general, the use of these private macros is cumulative.
+// For example, the use of _XPG3 with no other restrictions on the X/Open
+// namespace will make the symbols visible for XPG3 through XPG6
+// compilation environments. The use of _XPG4_2 with no other X/Open
+// namespace restrictions indicates that the symbols were introduced in
+// XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
+// environments, but not for XPG3 or XPG4 compilation environments.
+//
+// _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
+// _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
+// _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
+// _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
+// _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
+// _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
+
+// X/Open Portability Guide, Issue 3
+
+// _XOPEN_VERSION is defined by the X/Open specifications and is not
+// normally defined by the application, except in the case of an XPG4
+// application. On the implementation side, _XOPEN_VERSION defined with
+// the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
+// with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
+// _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
+// application and with a value of 600 indicates an XPG6 (UNIX 03)
+// application and with a value of 700 indicates an XPG7 (UNIX 08).
+// The appropriate version is determined by the use of the
+// feature test macros described earlier. The value of _XOPEN_VERSION
+// defaults to 3 otherwise indicating support for XPG3 applications.
+
+// ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
+// conforming environments. ISO 9899:1999 says it does.
+//
+// The presence of _LONGLONG_TYPE says "long long exists" which is therefore
+// defined in all but strictly conforming environments that disallow it.
+
+// The following macro defines a value for the ISO C99 restrict
+// keyword so that _RESTRICT_KYWD resolves to "restrict" if
+// an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
+// if any other compiler is used. This allows for the use of single
+// prototype declarations regardless of compiler version.
+
+// The following macro defines a value for the ISO C11 _Noreturn
+// keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
+// an ISO C11 compiler is used and "" (null string) if any other
+// compiler is used. This allows for the use of single prototype
+// declarations regardless of compiler version.
+
+// ISO/IEC 9899:2011 Annex K
+
+// The following macro indicates header support for the ANSI C++
+// standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
+
+// The following macro indicates header support for the C99 standard,
+// ISO/IEC 9899:1999, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011, Programming Languages - C.
+
+// The following macro indicates header support for the C11 standard,
+// ISO/IEC 9899:2011 Annex K, Programming Languages - C.
+
+// The following macro indicates header support for DTrace. The value is an
+// integer that corresponds to the major version number for DTrace.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// wctype.h 1.13 89/11/02 SMI; JLE
+// from AT&T JAE 2.1
+// definitions for international functions
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <wctype.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type Wint_t = int32 /* wctype_iso.h:61:13 */
+
+type Wctype_t = int32 /* wctype_iso.h:69:13 */
+
+type Wctrans_t = uint32 /* wctype_iso.h:72:22 */
+
+type Locale_t = uintptr /* ctype.h:95:24 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/wchar.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <wchar.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE1 = struct{ F__pad [16]int64 } /* stdio_tag.h:40:9 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/wchar.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <wchar.h>.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// POSIX.1-2008 requires that the NULL macro be cast to type void *.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+type X__FILE = X__FILE1 /* stdio_tag.h:40:27 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__mbstate_t1 = struct{ F__filler [4]int64 } /* wchar_impl.h:40:9 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1998 by Sun Microsystems, Inc.
+// All rights reserved.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__mbstate_t = X__mbstate_t1 /* wchar_impl.h:46:3 */ // size of something in bytes
+
+type Clock_t = int64 /* time_iso.h:70:14 */
+
+type Time_t = int64 /* time_iso.h:75: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
+} /* time_iso.h:80:1 */
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/stdio.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Do all of our 'redefine_extname' processing before
+// declarations of the associated functions are seen.
+// This is necessary to keep gcc happy.
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/iso/stdio_iso.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+// Copyright 2014 PALO, Richard.
+//
+// Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// Copyright (c) 1988 AT&T
+// All Rights Reserved
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The contents of this header is limited to identifiers specified in the
+// C Standard. Any new identifiers specified in future amendments to the
+// C Standard must be placed in this header. If these new identifiers
+// are required to also be in the C++ Standard "std" namespace, then for
+// anything other than macro definitions, corresponding "using" directives
+// must also be added to <stdio.h>.
+
+// User-visible pieces of the ANSI C standard I/O package.
+
+// DO NOT EDIT THIS FILE.
+//
+// It has been auto-edited by fixincludes from:
+//
+// "/usr/include/sys/feature_tests.h"
+//
+// This had to be done to correct non-standard usages in the
+// original, manufacturer supplied header file.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2013 Garrett D'Amore <garrett@damore.org>
+// Copyright 2016 Joyent, Inc.
+// Copyright 2022 Oxide Computer Company
+//
+// Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// This file and its contents are supplied under the terms of the
+// Common Development and Distribution License ("CDDL"), version 1.0.
+// You may only use this file in accordance with the terms of version
+// 1.0 of the CDDL.
+//
+// A full copy of the text of the CDDL should have accompanied this
+// source. A copy of the CDDL is also available via the Internet at
+// http://www.illumos.org/license/CDDL.
+
+// Copyright 2014-2016 PALO, Richard.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// An application should not include this header directly. Instead it
+// should be included only through the inclusion of other Sun headers.
+//
+// The purpose of this header is to provide the type definitions for
+// the va_list argument used by a number of printf and printf like
+// functions. The headers that define these various function prototypes
+// #include this header directly. These include but are not necessarily
+// limited to <stdio.h>, <stdio_iso.h>, <wchar_iso.h>, <strlog.h> and
+// <syslog.h>. The type definitions included in this header are for
+// the benefit of consumers of va_list.
+//
+// Any application that accepts variable argument lists must as documented,
+// include either <varargs.h> or the preferred <stdarg.h>. Doing so will
+// pull in the appropriate compiler protocols defined in <sys/va_impl.h>
+// which is in turn is included by <varargs.h> and <stdarg.h>. See comments
+// in <sys/va_impl.h> for more detailed information regarding implementation
+// and compiler specific protocols.
+
+// The common definitions exported by this header or compilers using
+// this header are:
+//
+// the identifier __builtin_va_alist for the variable list pseudo parameter
+// the type __va_alist_type for the variable list pseudo parameter
+// the type __va_list defining the type of the variable list iterator
+//
+// The feature macros (e.g. __BUILTIN_VA_STRUCT) and compiler macros
+// (__GNUC__) and processor macros (e.g. __amd64) are intended to be
+// defined by the compilation system, not the user of the system.
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License (the "License").
+// You may not use this file except in compliance with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+
+// Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+// Copyright 2016 Joyent, Inc.
+
+type X__gnuc_va_list = uintptr /* va_list.h:108:27 */
+// XX64 This seems unnecessary .. but is needed because vcmn_err is
+//
+// defined with __va_list instead of plain old va_list.
+// Perhaps that should be fixed!
+type X__va_list = uintptr /* va_list.h:114:27 */
+
+// If feature test macros are set that enable interfaces that use types
+// defined in <sys/types.h>, get those types by doing the include.
+//
+// Note that in asking for the interfaces associated with this feature test
+// macro one also asks for definitions of the POSIX types.
+
+type FILE = X__FILE /* stdio_iso.h:102:16 */
+
+type Fpos_t = int64 /* stdio_iso.h:115:15 */
+
+type Off_t = int64 /* stdio.h:172:15 */
+type Off64_t = int64 /* stdio.h:178:16 */
+
+type Fpos64_t = int64 /* stdio.h:188:17 */
+
+// large file compilation environment setup
+
+// In the LP64 compilation environment, all APIs are already large file
+
+type Ssize_t = int64 /* stdio.h:270:14 */
+
+// A null pointer constant.
+
+// 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.
+type Max_align_t = struct {
+ F__max_align_ll int64
+ F__max_align_ld float64
+} /* stddef.h:435:3 */
+
+// CDDL HEADER START
+//
+// The contents of this file are subject to the terms of the
+// Common Development and Distribution License, Version 1.0 only
+// (the "License"). You may not use this file except in compliance
+// with the License.
+//
+// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+// or http://www.opensolaris.org/os/licensing.
+// See the License for the specific language governing permissions
+// and limitations under the License.
+//
+// When distributing Covered Code, include this CDDL HEADER in each
+// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+// If applicable, add the following below this CDDL HEADER, with the
+// fields enclosed by brackets "[]" replaced with your own identifying
+// information: Portions Copyright [yyyy] [name of copyright owner]
+//
+// CDDL HEADER END
+// Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+// All Rights Reserved
+
+// Copyright 2014 Garrett D'Amore <garrett@damore.org>
+//
+// Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+// Use is subject to license terms.
+
+// wchar_t is a built-in type in standard C++ and as such is not
+// defined here when using standard C++. However, the GNU compiler
+// fixincludes utility nonetheless creates its own version of this
+// header for use by gcc and g++. In that version it adds a redundant
+// guard for __cplusplus. To avoid the creation of a gcc/g++ specific
+// header we need to include the following magic comment:
+//
+// we must use the C++ compiler's type
+//
+// The above comment should not be removed or changed until GNU
+// gcc/fixinc/inclhack.def is updated to bypass this header.
+
+// not XPG4 and not XPG4v2
+
+type Mbstate_t = X__mbstate_t /* wchar_iso.h:134:21 */
+
+// Allow global visibility for symbols defined in
+// C++ "std" namespace in <iso/wctype_iso.h>.
+
+// do not allow any of the following in a strictly conforming application
+
+// data structure for supplementary code set
+// for character class and conversion
+type X_wctype = struct {
+ Ftmin int32
+ Ftmax int32
+ Findex uintptr
+ Ftype uintptr
+ Fcmin int32
+ Fcmax int32
+ Fcode uintptr
+} /* wctype.h:84:1 */
+
+var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go b/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go
index a36ea7c5a..80f6a1dd0 100644
--- a/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go
+++ b/vendor/modernc.org/libc/wctype/wctype_linux_loong64.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 -ignore-unsupported-alignment -o wctype/wctype_linux_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_linux_loong64.go -pkgname wctype', DO NOT EDIT.
package wctype
@@ -15,28 +15,39 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
- WEOF = 4294967295 // wctype.h:33:1:
- X_ATFILE_SOURCE = 1 // features.h:342:1:
- X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
- X_BITS_ENDIAN_H = 1 // endian.h:20:1:
- X_BITS_TIME64_H = 1 // time64.h:24:1:
- X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
- X_BITS_TYPES_H = 1 // types.h:24:1:
- X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
- X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
- X_BITS_WCTYPE_WCHAR_H = 1 // wctype-wchar.h:24:1:
- X_DEFAULT_SOURCE = 1 // features.h:227:1:
- X_FEATURES_H = 1 // features.h:19:1:
- X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
- X_LP64 = 1 // <predefined>:284:1:
- X_POSIX_C_SOURCE = 200809 // features.h:281:1:
- X_POSIX_SOURCE = 1 // features.h:279:1:
- X_STDC_PREDEF_H = 1 // <predefined>:162:1:
- X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
- X_WCTYPE_H = 1 // wctype.h:24:1:
- X_WINT_T = 1 // wint_t.h:10:1:
- Linux = 1 // <predefined>:231:1:
- Unix = 1 // <predefined>:177:1:
+ WEOF = 4294967295 // wctype.h:33:1:
+ X_ABILP64 = 3 // <predefined>:377:1:
+ X_ATFILE_SOURCE = 1 // features.h:353:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:20:1:
+ X_BITS_WCTYPE_WCHAR_H = 1 // wctype-wchar.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:238:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LOONGARCH_ARCH = "loongarch64" // <predefined>:214:1:
+ X_LOONGARCH_ARCH_LOONGARCH64 = 1 // <predefined>:340:1:
+ X_LOONGARCH_FPSET = 32 // <predefined>:265:1:
+ X_LOONGARCH_SIM = 3 // <predefined>:233:1:
+ X_LOONGARCH_SPFPSET = 32 // <predefined>:88:1:
+ X_LOONGARCH_SZINT = 32 // <predefined>:230:1:
+ X_LOONGARCH_SZLONG = 64 // <predefined>:388:1:
+ X_LOONGARCH_SZPTR = 64 // <predefined>:200:1:
+ X_LOONGARCH_TUNE = "la464" // <predefined>:245:1:
+ X_LOONGARCH_TUNE_LA464 = 1 // <predefined>:63:1:
+ X_LP64 = 1 // <predefined>:372:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:292:1:
+ X_POSIX_SOURCE = 1 // features.h:290:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:223:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:20:1:
+ X_WCTYPE_H = 1 // wctype.h:24:1:
+ X_WINT_T = 1 // wint_t.h:10:1:
+ Linux = 1 // <predefined>:308:1:
+ Unix = 1 // <predefined>:247:1:
)
// The characteristics are stored always in network byte order (big
@@ -44,7 +55,7 @@ const (
// machine's byte order.
// Endian macros for string.h functions
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -71,7 +82,7 @@ const (
// This file defines `__BYTE_ORDER' for the particular machine.
-// i386/x86_64 are little-endian.
+// LoongArch is little-endian.
// Some machines may need to use a different endianness for floating point
// values.
@@ -122,7 +133,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -142,7 +153,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// ISO C99 Standard: 7.25
// Wide character classification and mapping utilities <wctype.h>
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -174,6 +185,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Extensions to ISO C11 from TS 18661-4:2015.
// __STDC_WANT_IEC_60559_TYPES_EXT__
// Extensions to ISO C11 from TS 18661-3:2015.
+// __STDC_WANT_IEC_60559_EXT__
+// ISO C2X interfaces defined only in Annex F.
//
// _POSIX_SOURCE IEEE Std 1003.1.
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -189,12 +202,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
// _FILE_OFFSET_BITS=N Select default filesystem interface.
// _ATFILE_SOURCE Additional *at interfaces.
+// _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// _GNU_SOURCE All of the above, plus GNU extensions.
// _DEFAULT_SOURCE The default set of features (taking precedence over
// __STRICT_ANSI__).
//
// _FORTIFY_SOURCE Add security hardening to many library functions.
-// Set to 1 or 2; 2 performs stricter checks than 1.
+// Set to 1, 2 or 3; 3 performs stricter checks than 2, which
+// performs stricter checks than 1.
//
// _REENTRANT, _THREAD_SAFE
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
@@ -235,6 +251,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __USE_FILE_OFFSET64 Define 64bit interface as default.
// __USE_MISC Define things from 4.3BSD or System V Unix.
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+// MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
// __USE_GNU Define GNU extensions.
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
//
@@ -305,6 +323,62 @@ type X__float128 = float64 /* <builtin>:47:21 */
// comprehensive support for multithreaded code. Using them never
// lowers the selected level of POSIX conformance, only raises it.
+// Features part to handle 64-bit time_t support.
+// Copyright (C) 2021-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We need to know the word size in order to check the time size.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// The function 'gets' existed in C89, but is impossible to use
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
// compatibility with various implementations of <cstdio>, this test
@@ -323,9 +397,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
+// ISO C2X added support for a 0b or 0B prefix on binary constants as
+// inputs to strtol-family functions (base 0 or 2). This macro is
+// used to condition redirection in headers to allow that redirection
+// to be disabled when building those functions, despite _GNU_SOURCE
+// being defined.
+
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -353,7 +433,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
-// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// Copyright (C) 1992-2023 Free Software Foundation, Inc.
+// Copyright The GNU Toolchain Authors.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -374,23 +455,24 @@ type X__float128 = float64 /* <builtin>:47:21 */
// The GNU libc does not support any K&R compilers or the traditional mode
// of ISO C compilers anymore. Check for some of the combinations not
-// anymore supported.
+// supported anymore.
// Some user header file might have defined this before.
+// Compilers that lack __has_attribute may object to
+// #if defined __has_attribute && __has_attribute (...)
+// even though they do not need to evaluate the right-hand side of the &&.
+// Similarly for __has_builtin, etc.
+
// All functions, except those with callbacks or those that
// synchronize memory, are leaf functions.
// GCC can always grok prototypes. For C++ programs we add throw()
-// to help it optimize the function calls. But this works only with
-// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// to help it optimize the function calls. But this only works with
+// gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
// as non-throwing using a function attribute since programs can use
// the -fexceptions options for C code as well.
-// Compilers that are not clang may object to
-// #if defined __clang__ && __has_extension(...)
-// even though they do not need to evaluate the right-hand side of the &&.
-
// These two macros are not used in glibc anymore. They are kept here
// only because some other projects expect the macros to be defined.
@@ -403,6 +485,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Fortify support.
+// Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.
+
// Support for flexible arrays.
// Headers that should use flexible arrays only if they're "real"
// (e.g. only if they won't affect sizeof()) should test
@@ -423,8 +507,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
-// GCC has various useful declarations that can be made with the
-// `__attribute__' syntax. All of the ways we use this do fine if
+// GCC and clang have various useful declarations that can be made with
+// the '__attribute__' syntax. All of the ways we use this do fine if
// they are omitted for compilers that don't understand it.
// At some point during the gcc 2.96 development the `malloc' attribute
@@ -434,6 +518,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Tell the compiler which arguments to an allocation function
// indicate the size of the allocation.
+// Tell the compiler which argument to an allocation function
+// indicates the alignment of the allocation.
+
// At some point during the gcc 2.96 development the `pure' attribute
// for functions was introduced. We don't want to use it unconditionally
// (although this would be possible) since it generates warnings.
@@ -462,8 +549,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// unconditionally (although this would be possible) since it
// generates warnings.
-// The nonull function attribute allows to mark pointer parameters which
-// must not be NULL.
+// The nonnull function attribute marks pointer parameters that
+// must not be NULL. This has the name __nonnull in glibc,
+// and __attribute_nonnull__ in files shared with Gnulib to avoid
+// collision with a different __nonnull in DragonFlyBSD 5.9.
+
+// The returns_nonnull function attribute marks the return type of the function
+// as always being non-null.
// If fortification mode, we warn about unused results of certain
// function calls which can lead to problems.
@@ -494,11 +586,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// `__extension__' keyword. But this is not generally available before
// version 2.8.
-// __restrict is known in EGCS 1.2 and above.
+// __restrict is known in EGCS 1.2 and above, and in clang.
+// It works also in C++ mode (outside of arrays), but only when spelled
+// as '__restrict', not 'restrict'.
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
// array_name[restrict]
-// GCC 3.1 supports this.
+// GCC 3.1 and clang support this.
+// This syntax is not usable in C++ mode.
// Describes a char array whose address can safely be passed as the first
// argument to strncpy and strncat, as the char array is not necessarily
@@ -508,11 +603,27 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Copies attributes from the declaration or type referenced by
// the argument.
-// Determine the wordsize from the preprocessor defines.
+// Gnulib avoids including these, as they don't work on non-glibc or
+// older glibc platforms.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Properties of long double type. ldbl-96 version.
-// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// Properties of long double type. ldbl-128 version.
+// Copyright (C) 2016-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -546,6 +657,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// On the other hand, Clang also defines __GNUC__, so a clang-specific
// check is required to enable the use of generic selection.
+// Designates a 1-based positional argument ref-index of pointer type
+// that can be used to access size-index elements of the pointed-to
+// array according to access mode, or at least one element when
+// size-index is not provided:
+// access (access-mode, <ref-index> [, <size-index>])
+// For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
+// use the access attribute to get object sizes from function definition
+// arguments, so we can't use them on functions we fortify. Drop the object
+// size hints for such functions.
+
+// Designates dealloc as a function to call to deallocate objects
+// allocated by the declared function.
+
+// Specify that a function such as setjmp or vfork may return
+// twice.
+
// If we don't have __REDIRECT, prototypes will be missing if
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
@@ -559,13 +686,30 @@ type X__float128 = float64 /* <builtin>:47:21 */
// This file selects the right generated file of `__stub_FUNCTION' macros
// based on the architecture being compiled for.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
// in the C library which is a stub, meaning it will fail
// every time called, usually setting errno to ENOSYS.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -584,7 +728,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Never include this file directly; use <sys/types.h> instead.
-// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// Copyright (C) 1991-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -601,11 +745,25 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// Determine the wordsize from the preprocessor defines.
+// Copyright (C) 1999-2023 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
-// Both x86-64 and x32 use the 64-bit system call interface.
-// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -622,7 +780,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
-// For others, time size is word size.
+// Size in bits of the 'time_t' type of the default ABI.
// Convenience types.
type X__u_char = uint8 /* types.h:31:23 */
@@ -641,14 +799,14 @@ type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:52:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
-type X__int_least16_t = X__int16_t /* types.h:54:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
-type X__int_least32_t = X__int32_t /* types.h:56:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
-type X__int_least64_t = X__int64_t /* types.h:58:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+type X__int_least8_t = int8 /* types.h:52:18 */
+type X__uint_least8_t = uint8 /* types.h:53:19 */
+type X__int_least16_t = int16 /* types.h:54:19 */
+type X__uint_least16_t = uint16 /* types.h:55:20 */
+type X__int_least32_t = int32 /* types.h:56:19 */
+type X__uint_least32_t = uint32 /* types.h:57:20 */
+type X__int_least64_t = int64 /* types.h:58:19 */
+type X__uint_least64_t = uint64 /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:63:18 */
@@ -688,8 +846,8 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// and int is always 32 bits.
// No need to mark the typedef with __extension__.
-// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
-// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+// Copyright (C) 2011-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -703,14 +861,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
+// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
-// X32 kernel interface is 64-bit.
-
// Tell the libc code that off_t and off64_t are actually the same type
// for all ABI purposes, even if possibly expressed as different base types
// for C type-checking purposes.
@@ -721,10 +877,12 @@ type X__uintmax_t = uint64 /* types.h:73:27 */
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+// And for getitimer, setitimer and rusage
+
// Number of descriptors that can fit in an `fd_set'.
// bits/time64.h -- underlying types for __time64_t. Generic version.
-// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// Copyright (C) 2018-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -751,7 +909,7 @@ type X__gid_t = uint32 /* types.h:147:25 */ // Type of group
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
@@ -763,60 +921,61 @@ type X__id_t = uint32 /* types.h:159:24 */ // General type
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+type X__suseconds64_t = int64 /* types.h:163:33 */
-type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+type X__daddr_t = int32 /* types.h:165:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:166:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:168:29 */
+type X__clockid_t = int32 /* types.h:169:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:171:12 */
+type X__timer_t = uintptr /* types.h:172:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:174:29 */
+type X__blksize_t = int32 /* types.h:175:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:179:28 */
-type X__blkcnt64_t = int64 /* types.h:180:30 */
+type X__blkcnt_t = int64 /* types.h:180:28 */
+type X__blkcnt64_t = int64 /* types.h:181:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:183:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+type X__fsblkcnt_t = uint64 /* types.h:184:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:185:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:187:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+type X__fsfilcnt_t = uint64 /* types.h:188:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:189:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:191:28 */
+type X__fsword_t = int64 /* types.h:192:28 */
-type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:194:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:196:33 */
+type X__syscall_slong_t = int64 /* types.h:197:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:198: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.
-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 */
+type X__loff_t = int64 /* types.h:203:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:204:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:206:25 */
+type X__intptr_t = int64 /* types.h:207:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:209:23 */
+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.
-type X__sig_atomic_t = int32 /* types.h:214:13 */
+type X__sig_atomic_t = int32 /* types.h:215: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
@@ -840,7 +999,7 @@ type Wint_t = uint32 /* wint_t.h:20:23 */
// Some definitions from this header also appear in <wchar.h> in
// Unix98 mode.
-// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// Copyright (C) 1996-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -861,7 +1020,7 @@ type Wint_t = uint32 /* wint_t.h:20:23 */
// Wide character classification and mapping utilities <wctype.h>
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// Copyright (C) 2002-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -897,7 +1056,7 @@ type Wctrans_t = uintptr /* wctype.h:48:25 */
// POSIX.1-2008 extended locale interface (see locale.h).
// Definition of locale_t.
-// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// Copyright (C) 2017-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -915,9 +1074,8 @@ type Wctrans_t = uintptr /* wctype.h:48:25 */
// <https://www.gnu.org/licenses/>.
// Definition of struct __locale_struct and __locale_t.
-// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// Copyright (C) 1997-2023 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
-// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@ -944,10 +1102,10 @@ type X__locale_struct = struct {
F__ctype_tolower uintptr
F__ctype_toupper uintptr
F__names [13]uintptr
-} /* __locale_t.h:28:1 */
+} /* __locale_t.h:27:1 */
-type X__locale_t = uintptr /* __locale_t.h:42:32 */
+type X__locale_t = uintptr /* __locale_t.h:41:32 */
-type Locale_t = X__locale_t /* locale_t.h:24:20 */
+type Locale_t = uintptr /* locale_t.h:24:20 */
var _ int8 /* gen.c:2:13: */
diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_mips64le.go b/vendor/modernc.org/libc/wctype/wctype_linux_mips64le.go
new file mode 100644
index 000000000..a36ea7c5a
--- /dev/null
+++ b/vendor/modernc.org/libc/wctype/wctype_linux_mips64le.go
@@ -0,0 +1,953 @@
+// 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_linux_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 (
+ WEOF = 4294967295 // wctype.h:33:1:
+ X_ATFILE_SOURCE = 1 // features.h:342:1:
+ X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1:
+ X_BITS_ENDIAN_H = 1 // endian.h:20:1:
+ X_BITS_TIME64_H = 1 // time64.h:24:1:
+ X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1:
+ X_BITS_TYPES_H = 1 // types.h:24:1:
+ X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1:
+ X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1:
+ X_BITS_WCTYPE_WCHAR_H = 1 // wctype-wchar.h:24:1:
+ X_DEFAULT_SOURCE = 1 // features.h:227:1:
+ X_FEATURES_H = 1 // features.h:19:1:
+ X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
+ X_LP64 = 1 // <predefined>:284:1:
+ X_POSIX_C_SOURCE = 200809 // features.h:281:1:
+ X_POSIX_SOURCE = 1 // features.h:279:1:
+ X_STDC_PREDEF_H = 1 // <predefined>:162:1:
+ X_SYS_CDEFS_H = 1 // cdefs.h:19:1:
+ X_WCTYPE_H = 1 // wctype.h:24:1:
+ X_WINT_T = 1 // wint_t.h:10:1:
+ Linux = 1 // <predefined>:231:1:
+ Unix = 1 // <predefined>:177:1:
+)
+
+// The characteristics are stored always in network byte order (big
+// endian). We define the bit value interpretations here dependent on the
+// machine's byte order.
+
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <http://www.gnu.org/licenses/>.
+
+// Definitions for byte order, according to significance of bytes,
+// from low addresses to high addresses. The value is what you get by
+// putting '4' in the most significant byte, '3' in the second most
+// significant byte, '2' in the second least significant byte, and '1'
+// in the least significant byte, and then writing down one digit for
+// each byte, starting with the byte at the lowest address at the left,
+// and proceeding to the byte with the highest address at the right.
+
+// This file defines `__BYTE_ORDER' for the particular machine.
+
+// i386/x86_64 are little-endian.
+
+// Some machines may need to use a different endianness for floating point
+// values.
+
+const ( /* wctype-wchar.h:56:1: */
+ X__ISwupper = 0 // UPPERCASE.
+ X__ISwlower = 1 // lowercase.
+ X__ISwalpha = 2 // Alphabetic.
+ X__ISwdigit = 3 // Numeric.
+ X__ISwxdigit = 4 // Hexadecimal numeric.
+ X__ISwspace = 5 // Whitespace.
+ X__ISwprint = 6 // Printing.
+ X__ISwgraph = 7 // Graphical.
+ X__ISwblank = 8 // Blank (usually SPC and TAB).
+ X__ISwcntrl = 9 // Control character.
+ X__ISwpunct = 10 // Punctuation.
+ X__ISwalnum = 11 // Alphanumeric.
+
+ X_ISwupper = 16777216 // UPPERCASE.
+ X_ISwlower = 33554432 // lowercase.
+ X_ISwalpha = 67108864 // Alphabetic.
+ X_ISwdigit = 134217728 // Numeric.
+ X_ISwxdigit = 268435456 // Hexadecimal numeric.
+ X_ISwspace = 536870912 // Whitespace.
+ X_ISwprint = 1073741824 // Printing.
+ X_ISwgraph = -2147483648 // Graphical.
+ X_ISwblank = 65536 // Blank (usually SPC and TAB).
+ X_ISwcntrl = 131072 // Control character.
+ X_ISwpunct = 262144 // Punctuation.
+ X_ISwalnum = 524288
+)
+
+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 */
+
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.25
+// Wide character classification and mapping utilities <wctype.h>
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// These are defined by the user (or the compiler)
+// to specify the desired environment:
+//
+// __STRICT_ANSI__ ISO Standard C.
+// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
+// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+// __STDC_WANT_LIB_EXT2__
+// Extensions to ISO C99 from TR 27431-2:2010.
+// __STDC_WANT_IEC_60559_BFP_EXT__
+// Extensions to ISO C11 from TS 18661-1:2014.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__
+// Extensions to ISO C11 from TS 18661-4:2015.
+// __STDC_WANT_IEC_60559_TYPES_EXT__
+// Extensions to ISO C11 from TS 18661-3:2015.
+//
+// _POSIX_SOURCE IEEE Std 1003.1.
+// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+// if >=199309L, add IEEE Std 1003.1b-1993;
+// if >=199506L, add IEEE Std 1003.1c-1995;
+// if >=200112L, all of IEEE 1003.1-2004
+// if >=200809L, all of IEEE 1003.1-2008
+// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
+// Single Unix conformance is wanted, to 600 for the
+// sixth revision, to 700 for the seventh revision.
+// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
+// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
+// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
+// _FILE_OFFSET_BITS=N Select default filesystem interface.
+// _ATFILE_SOURCE Additional *at interfaces.
+// _GNU_SOURCE All of the above, plus GNU extensions.
+// _DEFAULT_SOURCE The default set of features (taking precedence over
+// __STRICT_ANSI__).
+//
+// _FORTIFY_SOURCE Add security hardening to many library functions.
+// Set to 1 or 2; 2 performs stricter checks than 1.
+//
+// _REENTRANT, _THREAD_SAFE
+// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
+//
+// The `-ansi' switch to the GNU C compiler, and standards conformance
+// options such as `-std=c99', define __STRICT_ANSI__. If none of
+// these are defined, or if _DEFAULT_SOURCE is defined, the default is
+// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
+// 200809L, as well as enabling miscellaneous functions from BSD and
+// SVID. If more than one of these are defined, they accumulate. For
+// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
+// give you ISO C, 1003.1, and 1003.2, but nothing else.
+//
+// These are defined by this file and are used by the
+// header files to decide what to declare or define:
+//
+// __GLIBC_USE (F) Define things from feature set F. This is defined
+// to 1 or 0; the subsequent macros are either defined
+// or undefined, and those tests should be moved to
+// __GLIBC_USE.
+// __USE_ISOC11 Define ISO C11 things.
+// __USE_ISOC99 Define ISO C99 things.
+// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
+// __USE_ISOCXX11 Define ISO C++11 things.
+// __USE_POSIX Define IEEE Std 1003.1 things.
+// __USE_POSIX2 Define IEEE Std 1003.2 things.
+// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
+// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
+// __USE_XOPEN Define XPG things.
+// __USE_XOPEN_EXTENDED Define X/Open Unix things.
+// __USE_UNIX98 Define Single Unix V2 things.
+// __USE_XOPEN2K Define XPG6 things.
+// __USE_XOPEN2KXSI Define XPG6 XSI things.
+// __USE_XOPEN2K8 Define XPG7 things.
+// __USE_XOPEN2K8XSI Define XPG7 XSI things.
+// __USE_LARGEFILE Define correct standard I/O things.
+// __USE_LARGEFILE64 Define LFS things with separate names.
+// __USE_FILE_OFFSET64 Define 64bit interface as default.
+// __USE_MISC Define things from 4.3BSD or System V Unix.
+// __USE_ATFILE Define *at interfaces and AT_* constants for them.
+// __USE_GNU Define GNU extensions.
+// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
+//
+// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
+// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
+// only for compatibility. All new code should use the other symbols
+// to test for features.
+//
+// All macros listed above as possibly being defined by this file are
+// explicitly undefined if they are not explicitly defined.
+// Feature-test macros that are not defined by the user or compiler
+// but are implied by the other feature-test macros defined (or by the
+// lack of any definitions) are defined by the file.
+//
+// ISO C feature test macros depend on the definition of the macro
+// when an affected header is included, not when the first system
+// header is included, and so they are handled in
+// <bits/libc-header-start.h>, which does not have a multiple include
+// guard. Feature test macros that can be handled from the first
+// system header included are handled here.
+
+// Undefine everything, so we get a clean slate.
+
+// Suppress kernel-name space pollution unless user expressedly asks
+// for it.
+
+// Convenience macro to test the version of gcc.
+// Use like this:
+// #if __GNUC_PREREQ (2,8)
+// ... code requiring gcc 2.8 or later ...
+// #endif
+// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
+// added in 2.0.
+
+// Similarly for clang. Features added to GCC after version 4.2 may
+// or may not also be available in clang, and clang's definitions of
+// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
+// features can be queried via __has_extension/__has_feature.
+
+// Whether to use feature set F.
+
+// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
+// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
+// issue a warning; the expectation is that the source is being
+// transitioned to use the new macro.
+
+// If _GNU_SOURCE was defined by the user, turn on all the other features.
+
+// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
+// define _DEFAULT_SOURCE.
+
+// This is to enable the ISO C2X extension.
+
+// This is to enable the ISO C11 extension.
+
+// This is to enable the ISO C99 extension.
+
+// This is to enable the ISO C90 Amendment 1:1995 extension.
+
+// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
+// is defined, use POSIX.1-2008 (or another version depending on
+// _XOPEN_SOURCE).
+
+// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
+// defined in all multithreaded code. GNU libc has not required this
+// for many years. We now treat them as compatibility synonyms for
+// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
+// comprehensive support for multithreaded code. Using them never
+// lowers the selected level of POSIX conformance, only raises it.
+
+// The function 'gets' existed in C89, but is impossible to use
+// safely. It has been removed from ISO C11 and ISO C++14. Note: for
+// compatibility with various implementations of <cstdio>, this test
+// must consider only the value of __cplusplus when compiling C++.
+
+// GNU formerly extended the scanf functions with modified format
+// specifiers %as, %aS, and %a[...] that allocate a buffer for the
+// input using malloc. This extension conflicts with ISO C99, which
+// defines %a as a standalone format specifier that reads a floating-
+// point number; moreover, POSIX.1-2008 provides the same feature
+// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
+//
+// We now follow C99 unless GNU extensions are active and the compiler
+// is specifically in C89 or C++98 mode (strict or not). For
+// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
+// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
+// old extension.
+
+// Get definitions of __STDC_* predefined macros, if the compiler has
+// not preincluded this header automatically.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// This macro indicates that the installed library is the GNU C Library.
+// For historic reasons the value now is 6 and this will stay from now
+// on. The use of this variable is deprecated. Use __GLIBC__ and
+// __GLIBC_MINOR__ now (see below) when you want to test for a specific
+// GNU C library version and use the values in <gnu/lib-names.h> to get
+// the sonames of the shared libraries.
+
+// Major and minor version number of the GNU C library package. Use
+// these macros to test for features in specific releases.
+
+// This is here only because every header file already includes this one.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// We are almost always included from features.h.
+
+// The GNU libc does not support any K&R compilers or the traditional mode
+// of ISO C compilers anymore. Check for some of the combinations not
+// anymore supported.
+
+// Some user header file might have defined this before.
+
+// All functions, except those with callbacks or those that
+// synchronize memory, are leaf functions.
+
+// GCC can always grok prototypes. For C++ programs we add throw()
+// to help it optimize the function calls. But this works only with
+// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+// as non-throwing using a function attribute since programs can use
+// the -fexceptions options for C code as well.
+
+// Compilers that are not clang may object to
+// #if defined __clang__ && __has_extension(...)
+// even though they do not need to evaluate the right-hand side of the &&.
+
+// These two macros are not used in glibc anymore. They are kept here
+// only because some other projects expect the macros to be defined.
+
+// For these things, GCC behaves the ANSI way normally,
+// and the non-ANSI way under -traditional.
+
+// This is not a typedef so `const __ptr_t' does the right thing.
+
+// C++ needs to know that types and declarations are C, not C++.
+
+// Fortify support.
+
+// Support for flexible arrays.
+// Headers that should use flexible arrays only if they're "real"
+// (e.g. only if they won't affect sizeof()) should test
+// #if __glibc_c99_flexarr_available.
+
+// __asm__ ("xyz") is used throughout the headers to rename functions
+// at the assembly language level. This is wrapped by the __REDIRECT
+// macro, in order to support compilers that can do this some other
+// way. When compilers don't support asm-names at all, we have to do
+// preprocessor tricks instead (which don't have exactly the right
+// semantics, but it's the best we can do).
+//
+// Example:
+// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
+
+//
+// #elif __SOME_OTHER_COMPILER__
+//
+// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
+
+// GCC has various useful declarations that can be made with the
+// `__attribute__' syntax. All of the ways we use this do fine if
+// they are omitted for compilers that don't understand it.
+
+// At some point during the gcc 2.96 development the `malloc' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Tell the compiler which arguments to an allocation function
+// indicate the size of the allocation.
+
+// At some point during the gcc 2.96 development the `pure' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// This declaration tells the compiler that the value is constant.
+
+// At some point during the gcc 3.1 development the `used' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+
+// Since version 3.2, gcc allows marking deprecated functions.
+
+// Since version 4.5, gcc also allows one to specify the message printed
+// when a deprecated function is used. clang claims to be gcc 4.2, but
+// may also support this feature.
+
+// At some point during the gcc 2.8 development the `format_arg' attribute
+// for functions was introduced. We don't want to use it unconditionally
+// (although this would be possible) since it generates warnings.
+// If several `format_arg' attributes are given for the same function, in
+// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
+// all designated arguments are considered.
+
+// At some point during the gcc 2.97 development the `strfmon' format
+// attribute for functions was introduced. We don't want to use it
+// unconditionally (although this would be possible) since it
+// generates warnings.
+
+// The nonull function attribute allows to mark pointer parameters which
+// must not be NULL.
+
+// If fortification mode, we warn about unused results of certain
+// function calls which can lead to problems.
+
+// Forces a function to be always inlined.
+// The Linux kernel defines __always_inline in stddef.h (283d7573), and
+// it conflicts with this definition. Therefore undefine it first to
+// allow either header to be included first.
+
+// Associate error messages with the source location of the call site rather
+// than with the source location inside the function.
+
+// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
+// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
+// older than 4.3 may define these macros and still not guarantee GNU inlining
+// semantics.
+//
+// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
+// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
+// __GNUC_GNU_INLINE__ macro definitions.
+
+// GCC 4.3 and above allow passing all anonymous arguments of an
+// __extern_always_inline function to some other vararg function.
+
+// It is possible to compile containing GCC extensions even if GCC is
+// run in pedantic mode if the uses are carefully marked using the
+// `__extension__' keyword. But this is not generally available before
+// version 2.8.
+
+// __restrict is known in EGCS 1.2 and above.
+
+// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
+// array_name[restrict]
+// GCC 3.1 supports this.
+
+// Describes a char array whose address can safely be passed as the first
+// argument to strncpy and strncat, as the char array is not necessarily
+// a NUL-terminated string.
+
+// Undefine (also defined in libc-symbols.h).
+// Copies attributes from the declaration or type referenced by
+// the argument.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Properties of long double type. ldbl-96 version.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// long double is distinct from double, so there is nothing to
+// define here.
+
+// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
+// intended for use in preprocessor macros.
+//
+// Note: MESSAGE must be a _single_ string; concatenation of string
+// literals is not supported.
+
+// Generic selection (ISO C11) is a C-only feature, available in GCC
+// since version 4.9. Previous versions do not provide generic
+// selection, even though they might set __STDC_VERSION__ to 201112L,
+// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
+// when testing __STDC_VERSION__ for generic selection support.
+// On the other hand, Clang also defines __GNUC__, so a clang-specific
+// check is required to enable the use of generic selection.
+
+// If we don't have __REDIRECT, prototypes will be missing if
+// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
+
+// Decide whether we can define 'extern inline' functions in headers.
+
+// This is here only because every header file already includes this one.
+// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
+// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
+// that will always return failure (and set errno to ENOSYS).
+// This file is automatically generated.
+// This file selects the right generated file of `__stub_FUNCTION' macros
+// based on the architecture being compiled for.
+
+// This file is automatically generated.
+// It defines a symbol `__stub_FUNCTION' for each function
+// in the C library which is a stub, meaning it will fail
+// every time called, usually setting errno to ENOSYS.
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Determine the wordsize from the preprocessor defines.
+
+// Both x86-64 and x32 use the 64-bit system call interface.
+// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// For others, time size is word size.
+
+// Convenience types.
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
+
+// Fixed-size types, underlying types depend on word size and compiler.
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
+
+// Smallest types with at least a given width.
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
+
+// quad_t is also 64 bits.
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
+
+// Largest integral types.
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
+
+// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
+// macros for each of the OS types we define below. The definitions
+// of those macros must use the following macros for underlying types.
+// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
+// variants of each of the following integer types on this machine.
+//
+// 16 -- "natural" 16-bit type (always short)
+// 32 -- "natural" 32-bit type (always int)
+// 64 -- "natural" 64-bit type (long or long long)
+// LONG32 -- 32-bit type, traditionally long
+// QUAD -- 64-bit type, traditionally long long
+// WORD -- natural type of __WORDSIZE bits (int or long)
+// LONGWORD -- type of __WORDSIZE bits, traditionally long
+//
+// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
+// conventional uses of `long' or `long long' type modifiers match the
+// types we define, even when a less-adorned type would be the same size.
+// This matters for (somewhat) portably writing printf/scanf formats for
+// these types, where using the appropriate l or ll format modifiers can
+// make the typedefs and the formats match up across all GNU platforms. If
+// we used `long' when it's 64 bits where `long long' is expected, then the
+// compiler would warn about the formats not matching the argument types,
+// and the programmer changing them to shut up the compiler would break the
+// program's portability.
+//
+// Here we assume what is presently the case in all the GCC configurations
+// we support: long long is always 64 bits, long is always word/address size,
+// and int is always 32 bits.
+
+// No need to mark the typedef with __extension__.
+// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
+// Copyright (C) 2012-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// See <bits/types.h> for the meaning of these macros. This file exists so
+// that <bits/types.h> need not vary across different GNU platforms.
+
+// X32 kernel interface is 64-bit.
+
+// Tell the libc code that off_t and off64_t are actually the same type
+// for all ABI purposes, even if possibly expressed as different base types
+// for C type-checking purposes.
+
+// Same for ino_t and ino64_t.
+
+// And for __rlim_t and __rlim64_t.
+
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
+// Number of descriptors that can fit in an `fd_set'.
+
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
+
+// Clock ID used in clock and timer functions.
+type X__clockid_t = int32 /* types.h:168:29 */
+
+// Timer ID returned by `timer_create'.
+type X__timer_t = uintptr /* types.h:171:12 */
+
+// Type to represent block size.
+type X__blksize_t = int64 /* types.h:174:29 */
+
+// Types from the Large File Support interface.
+
+// Type to count number of disk blocks.
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
+
+// Type to count file system blocks.
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
+
+// Type to count file system nodes.
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
+
+// Type of miscellaneous file system fields.
+type X__fsword_t = int64 /* types.h:191:28 */
+
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
+
+// Signed long type used in system calls.
+type X__syscall_slong_t = int64 /* types.h:196:33 */
+// Unsigned long type used in system calls.
+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.
+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 */
+
+// Duplicates info from stdint.h but this is used in unistd.h.
+type X__intptr_t = int64 /* types.h:206:25 */
+
+// Duplicate info from sys/socket.h.
+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.
+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.
+
+// Some versions of stddef.h provide wint_t, even though neither the
+// C nor C++ standards, nor POSIX, specifies this. We assume that
+// stddef.h will define the macro _WINT_T if and only if it provides
+// wint_t, and conversely, that it will avoid providing wint_t if
+// _WINT_T is already defined.
+
+// Integral type unchanged by default argument promotions that can
+// hold any value corresponding to members of the extended character
+// set, as well as at least one value that does not correspond to any
+// member of the extended character set.
+
+type Wint_t = uint32 /* wint_t.h:20:23 */
+
+// Constant expression of type `wint_t' whose value does not correspond
+// to any member of the extended character set.
+
+// Some definitions from this header also appear in <wchar.h> in
+// Unix98 mode.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// ISO C99 Standard: 7.25
+// Wide character classification and mapping utilities <wctype.h>
+
+// bits/types.h -- definitions of __*_t types underlying *_t types.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Never include this file directly; use <sys/types.h> instead.
+
+// The definitions in this header are specified to appear in <wctype.h>
+// 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.
+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.
+type Wctrans_t = uintptr /* wctype.h:48:25 */
+
+// POSIX.1-2008 extended locale interface (see locale.h).
+// Definition of locale_t.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// Definition of struct __locale_struct and __locale_t.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// <https://www.gnu.org/licenses/>.
+
+// POSIX.1-2008: the locale_t type, representing a locale context
+// (implementation-namespace version). This type should be treated
+// as opaque by applications; some details are exposed for the sake of
+// efficiency in e.g. ctype functions.
+
+type X__locale_struct = struct {
+ F__locales [13]uintptr
+ F__ctype_b uintptr
+ F__ctype_tolower uintptr
+ F__ctype_toupper uintptr
+ F__names [13]uintptr
+} /* __locale_t.h:28:1 */
+
+type X__locale_t = uintptr /* __locale_t.h:42:32 */
+
+type Locale_t = X__locale_t /* locale_t.h:24:20 */
+
+var _ int8 /* gen.c:2:13: */